public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] driver: net: fsl-mc: Free dflt_dpio pointer after its usage
@ 2016-03-18 10:45 Prabhakar Kushwaha
  2016-03-25 21:14 ` Joe Hershberger
  2016-03-29 15:43 ` York Sun
  0 siblings, 2 replies; 3+ messages in thread
From: Prabhakar Kushwaha @ 2016-03-18 10:45 UTC (permalink / raw)
  To: u-boot

Free dflt_dpio pointer after its usage during error handling

Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Reported-by: Jose Rivera <german.rivera@nxp.com>
---
 drivers/net/fsl-mc/mc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c
index 7ae619d..27f352d 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;
 }
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-29 15:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-18 10:45 [U-Boot] [PATCH] driver: net: fsl-mc: Free dflt_dpio pointer after its usage Prabhakar Kushwaha
2016-03-25 21:14 ` Joe Hershberger
2016-03-29 15:43 ` York Sun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox