From: Prabhakar Kushwaha Date: Fri, 18 Mar 2016 10:45:29 +0000 (+0530) Subject: driver: net: fsl-mc: Free dflt_dpio pointer after its usage X-Git-Tag: v2016.05-rc1~120^2~19 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=cd7b3fbcf46844230ad664884c18d0281a4a31d7;p=oweals%2Fu-boot.git driver: net: fsl-mc: Free dflt_dpio pointer after its usage Free dflt_dpio pointer after its usage during error handling Signed-off-by: Prabhakar Kushwaha Reported-by: Jose Rivera Reviewed-by: York Sun --- diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c index f83bd0c7f0..d2b8b5c47f 100644 --- a/drivers/net/fsl-mc/mc.c +++ b/drivers/net/fsl-mc/mc.c @@ -747,11 +747,11 @@ static int dpio_init(void) err_get_swp_init: dpio_disable(dflt_mc_io, MC_CMD_NO_FLAGS, dflt_dpio->dpio_handle); err_get_enable: - free(dflt_dpio); err_get_attr: dpio_close(dflt_mc_io, MC_CMD_NO_FLAGS, dflt_dpio->dpio_handle); dpio_destroy(dflt_mc_io, MC_CMD_NO_FLAGS, dflt_dpio->dpio_handle); err_create: + free(dflt_dpio); err_malloc: return err; }