Skip to contentSkip to conversation

soc: fsl: qbman: Fix return value on success

PATCH In review Krzysztof Kozlowski 2 participants 2 messages Sep 20, 2020 – Sep 22, 2020 Freescale SoC drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 soc: fsl: qbman: Fix return value on success

On error the function was meant to return -ERRNO. This also fixes compile warning:

drivers/soc/fsl/qbman/bman.c:640:6: warning: variable 'err' set but not used [-Wunused-but-set-variable]

Fixes 0505d00c8dba ("soc/fsl/qbman: Cleanup buffer pools if BMan was initialized prior to bootup")
---
 drivers/soc/fsl/qbman/bman.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/fsl/qbman/bman.c +1 -1
index f4fb527d8301..c5dd026fe889 100644
@@ -660,7 +660,7 @@ int bm_shutdown_pool(u32 bpid)
 	}
 done:
 	put_affine_portal();
-	return 0;
+	return err;
 }
 
 struct gen_pool *bm_bpalloc;
Signature · 1 line
2.17.1
#1 lore raw
Quoted 8 lines · Krzysztof Kozlowski

On error the function was meant to return -ERRNO. This also fixes compile warning:

drivers/soc/fsl/qbman/bman.c:640:6: warning: variable 'err' set but not used [-Wunused-but-set-variable]

Fixes 0505d00c8dba ("soc/fsl/qbman: Cleanup buffer pools if BMan was initialized prior to bootup")

Applied for next. Thanks.

Quoted 20 lines
---
 drivers/soc/fsl/qbman/bman.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/fsl/qbman/bman.c +1 -2
index f4fb527d8301..c5dd026fe889 100644
@@ -660,7 +660,7 @@ int bm_shutdown_pool(u32 bpid)
        }
 done:
        put_affine_portal();
-       return 0;
+       return err;
 }
 
 struct gen_pool *bm_bpalloc;
--

2.17.1