diff options
| author | Patrice Chotard <patrice.chotard@foss.st.com> | 2025-05-13 17:34:31 +0200 |
|---|---|---|
| committer | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2025-05-14 09:54:22 +0200 |
| commit | 388d0cc33cc6fc876e053644d6af694b9d5c639f (patch) | |
| tree | 4b3ca3072b32fbef232798b9c33ecc8aa162592c /drivers/memory/stm32_omm.c | |
| parent | 0169a24036848cf18205301673259bb6879eef97 (diff) | |
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 <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>
Diffstat (limited to 'drivers/memory/stm32_omm.c')
| -rw-r--r-- | drivers/memory/stm32_omm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/memory/stm32_omm.c b/drivers/memory/stm32_omm.c index 8523d9601af2..79ceb1635698 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++) { |