From: Patrice Chotard Date: Tue, 13 May 2025 15:34:31 +0000 (+0200) Subject: memory: stm32_omm: Fix error handling in stm32_omm_disable_child() X-Git-Tag: v6.16-rc1~100^2~3^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=388d0cc33cc6fc876e053644d6af694b9d5c639f;p=thirdparty%2Flinux.git 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: 8181d061dcff ("memory: Add STM32 Octo Memory Manager driver") Signed-off-by: Patrice Chotard Link: https://lore.kernel.org/r/20250513-stm32_omm_fix_typo-v1-1-5b90ec8b52e7@foss.st.com Reported-by: Dan Carpenter Closes: https://lore.kernel.org/all/aB29hOrv0nU73RCn@stanley.mountain/ Signed-off-by: Krzysztof Kozlowski --- diff --git a/drivers/memory/stm32_omm.c b/drivers/memory/stm32_omm.c index 8523d9601af20..79ceb1635698f 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++) {