* [PATCH] input: samsung-keypad: Add check for clk_enable()
@ 2025-04-12 19:43 Chenyuan Yang
0 siblings, 0 replies; only message in thread
From: Chenyuan Yang @ 2025-04-12 19:43 UTC (permalink / raw)
To: dmitry.torokhov, u.kleine-koenig, jy0922.shim, kyungmin.park,
kgene.kim
Cc: linux-input, linux-kernel, Chenyuan Yang
Add check for the return value of clk_enable() to catch
the potential error.
This is similar to the commit 8332e6670997
("spi: zynq-qspi: Add check for clk_enable()").
Signed-off-by: Chenyuan Yang <chenyuan0y@gmail.com>
Fixes: 0fffed27f92d ("Input: samsung-keypad - Add samsung keypad driver")
---
drivers/input/keyboard/samsung-keypad.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/input/keyboard/samsung-keypad.c b/drivers/input/keyboard/samsung-keypad.c
index 9f1049aa3048..a6657f8d085c 100644
--- a/drivers/input/keyboard/samsung-keypad.c
+++ b/drivers/input/keyboard/samsung-keypad.c
@@ -484,11 +484,14 @@ static int samsung_keypad_runtime_resume(struct device *dev)
struct platform_device *pdev = to_platform_device(dev);
struct samsung_keypad *keypad = platform_get_drvdata(pdev);
unsigned int val;
+ int ret;
if (keypad->stopped)
return 0;
- clk_enable(keypad->clk);
+ ret = clk_enable(keypad->clk);
+ if (ret)
+ return ret;
val = readl(keypad->base + SAMSUNG_KEYIFCON);
val &= ~SAMSUNG_KEYIFCON_WAKEUPEN;
--
2.34.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2025-04-12 19:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-12 19:43 [PATCH] input: samsung-keypad: Add check for clk_enable() Chenyuan Yang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).