Skip to contentSkip to conversation

driver: net: fsl-mc: Free dflt_dpio pointer after its usage

PATCH New Prabhakar Kushwaha 3 participants 3 messages Mar 18, 2016 – Mar 29, 2016 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 driver: net: fsl-mc: Free dflt_dpio pointer after its usage

Free dflt_dpio pointer after its usage during error handling

---
 drivers/net/fsl-mc/mc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/fsl-mc/mc.c +1 -1
index 7ae619d..27f352d 100644
@@ -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;
 }
Signature · 1 line
1.9.1