Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] memory: stm32_omm: Fix error handling in stm32_omm_disable_child()
@ 2025-05-13 15:34 Patrice Chotard
  2025-05-14  7:54 ` Krzysztof Kozlowski
  2025-05-14  7:56 ` Krzysztof Kozlowski
  0 siblings, 2 replies; 3+ messages in thread
From: Patrice Chotard @ 2025-05-13 15:34 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Maxime Coquelin, Alexandre Torgue,
	Christophe Kerello
  Cc: Krzysztof Kozlowski, linux-kernel, linux-stm32, linux-arm-kernel,
	Patrice Chotard

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>
---
 drivers/memory/stm32_omm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/memory/stm32_omm.c b/drivers/memory/stm32_omm.c
index 8523d9601af20fc8fe74cceea84e63d253cafec1..79ceb1635698f6bc8bd4a39fdeaced1ec318e1f6 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++) {

---
base-commit: 0169a24036848cf18205301673259bb6879eef97
change-id: 20250513-stm32_omm_fix_typo-edfb4fa49ded

Best regards,
-- 
Patrice Chotard <patrice.chotard@foss.st.com>



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-05-14  7:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-13 15:34 [PATCH] memory: stm32_omm: Fix error handling in stm32_omm_disable_child() Patrice Chotard
2025-05-14  7:54 ` Krzysztof Kozlowski
2025-05-14  7:56 ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox