diff mbox series

bus/fslmc: fix err path in device iterator

Message ID 20190717155518.4525-1-hemant.agrawal@nxp.com
State New
Headers show
Series bus/fslmc: fix err path in device iterator | expand

Commit Message

Hemant Agrawal July 17, 2019, 3:55 p.m. UTC
Fixes: e67a61614d0b ("bus/fslmc: support device iteration")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>

---
 drivers/bus/fslmc/fslmc_bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.17.1

Comments

Thomas Monjalon July 17, 2019, 4:08 p.m. UTC | #1
17/07/2019 17:55, Hemant Agrawal:
> Fixes: e67a61614d0b ("bus/fslmc: support device iteration")

> 

> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>


Tested-by: Thomas Monjalon <thomas@monjalon.net>
Thomas Monjalon July 17, 2019, 5:40 p.m. UTC | #2
17/07/2019 18:08, Thomas Monjalon:
> 17/07/2019 17:55, Hemant Agrawal:

> > Fixes: e67a61614d0b ("bus/fslmc: support device iteration")

> > 

> > Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>

> 

> Tested-by: Thomas Monjalon <thomas@monjalon.net>


Applied, thanks
diff mbox series

Patch

diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index a2ed3bcc9..9e4146aba 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -296,7 +296,7 @@  rte_fslmc_parse(const char *name, void *addr)
 
 	return 0;
 err_out:
-	if (sep)
+	if (!sep_exists && sep)
 		free(sep);
 	return -EINVAL;
 }