bus/fslmc: fix err path in device iterator

Message ID 20190717155518.4525-1-hemant.agrawal@nxp.com (mailing list archive)
State Accepted, archived
Headers
Series bus/fslmc: fix err path in device iterator |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/intel-Performance-Testing success Performance Testing PASS
ci/mellanox-Performance-Testing success Performance Testing PASS

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(-)
  

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
  

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;
 }