]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
memory: stm32_omm: Fix error handling in stm32_omm_disable_child()
authorPatrice Chotard <patrice.chotard@foss.st.com>
Tue, 13 May 2025 15:34:31 +0000 (17:34 +0200)
committerKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Wed, 14 May 2025 07:54:22 +0000 (09:54 +0200)
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>
Link: https://lore.kernel.org/r/20250513-stm32_omm_fix_typo-v1-1-5b90ec8b52e7@foss.st.com
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/all/aB29hOrv0nU73RCn@stanley.mountain/
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
drivers/memory/stm32_omm.c

index 8523d9601af20fc8fe74cceea84e63d253cafec1..79ceb1635698f6bc8bd4a39fdeaced1ec318e1f6 100644 (file)
@@ -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++) {