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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reported-by: Dan Carpenter <[email protected]> Closes: https://lore.kernel.org/all/[email protected]/ Signed-off-by: Krzysztof Kozlowski <[email protected]>
1 parent 0169a24 commit 388d0cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)