From: Chenyuan Yang <chenyuan0y@gmail.com>
To: dmitry.torokhov@gmail.com, u.kleine-koenig@baylibre.com,
jy0922.shim@samsung.com, kyungmin.park@samsung.com,
kgene.kim@samsung.com
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Chenyuan Yang <chenyuan0y@gmail.com>
Subject: [PATCH] input: samsung-keypad: Add check for clk_enable()
Date: Sat, 12 Apr 2025 14:43:59 -0500 [thread overview]
Message-ID: <20250412194359.164533-1-chenyuan0y@gmail.com> (raw)
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
reply other threads:[~2025-04-12 19:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250412194359.164533-1-chenyuan0y@gmail.com \
--to=chenyuan0y@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=jy0922.shim@samsung.com \
--cc=kgene.kim@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=u.kleine-koenig@baylibre.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.