Skip to content

Commit 388d0cc

Browse files
Patrice Chotardkrzk
authored andcommitted
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: 8181d06 ("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>
1 parent 0169a24 commit 388d0cc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/memory/stm32_omm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ static int stm32_omm_disable_child(struct device *dev)
164164
u8 i;
165165

166166
ret = stm32_omm_toggle_child_clock(dev, true);
167-
if (!ret)
167+
if (ret)
168168
return ret;
169169

170170
for (i = 0; i < omm->nb_child; i++) {

0 commit comments

Comments
 (0)