memory: stm32_omm: Fix error handling in stm32_omm_disable_child()

Fix stm32_omm_toggle_child_clock() return value test, we should exit
only on non zero value.

Fixes: 8181d061dc ("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>
This commit is contained in:
Patrice Chotard 2025-05-13 17:34:31 +02:00 committed by Krzysztof Kozlowski
parent 0169a24036
commit 388d0cc33c

View 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++) {