[PATCH] memory: stm32_omm: Fix error handling in stm32_omm_disable_child()

Patrice Chotard posted 1 patch 9 months ago
drivers/memory/stm32_omm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] memory: stm32_omm: Fix error handling in stm32_omm_disable_child()
Posted by Patrice Chotard 9 months ago
Fix stm32_omm_toggle_child_clock() return value test, we should exit
only on non zero value.

Fixes: 8181d061dcff ("memory: Add STM32 Octo Memory Manager driver")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
---
 drivers/memory/stm32_omm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/memory/stm32_omm.c b/drivers/memory/stm32_omm.c
index 8523d9601af20fc8fe74cceea84e63d253cafec1..79ceb1635698f6bc8bd4a39fdeaced1ec318e1f6 100644
--- a/drivers/memory/stm32_omm.c
+++ b/drivers/memory/stm32_omm.c
@@ -164,7 +164,7 @@ static int stm32_omm_disable_child(struct device *dev)
 	u8 i;
 
 	ret = stm32_omm_toggle_child_clock(dev, true);
-	if (!ret)
+	if (ret)
 		return ret;
 
 	for (i = 0; i < omm->nb_child; i++) {

---
base-commit: 0169a24036848cf18205301673259bb6879eef97
change-id: 20250513-stm32_omm_fix_typo-edfb4fa49ded

Best regards,
-- 
Patrice Chotard <patrice.chotard@foss.st.com>
Re: [PATCH] memory: stm32_omm: Fix error handling in stm32_omm_disable_child()
Posted by Krzysztof Kozlowski 9 months ago
On Tue, 13 May 2025 17:34:31 +0200, Patrice Chotard wrote:
> Fix stm32_omm_toggle_child_clock() return value test, we should exit
> only on non zero value.
> 
> 

Applied, thanks!

[1/1] memory: stm32_omm: Fix error handling in stm32_omm_disable_child()
      https://git.kernel.org/krzk/linux-mem-ctrl/c/388d0cc33cc6fc876e053644d6af694b9d5c639f

Best regards,
-- 
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Re: [PATCH] memory: stm32_omm: Fix error handling in stm32_omm_disable_child()
Posted by Krzysztof Kozlowski 9 months ago
On 13/05/2025 17:34, Patrice Chotard wrote:
> Fix stm32_omm_toggle_child_clock() return value test, we should exit
> only on non zero value.
> 
> Fixes: 8181d061dcff ("memory: Add STM32 Octo Memory Manager driver")

Please always give credits to people.

Best regards,
Krzysztof