mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] i2c: qcom-geni: Simplify PM resume error handling
@ 2026-08-05  7:00 Mukesh Kumar Savaliya
  2026-08-05  9:37 ` Praveen Talari
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Mukesh Kumar Savaliya @ 2026-08-05  7:00 UTC (permalink / raw)
  To: andi.shyti, linux-i2c, linux-arm-msm, linux-kernel, viken.dadhaniya
  Cc: Mukesh Kumar Savaliya

The driver currently logs pm_runtime_resume_and_get() failures with
dev_err() and returns the error code separately.

Replace this with dev_err_probe(), which combines the dev_err() log
message and the return value propagation into a single call, consistent
with how all other error paths in this driver already report failures.

No functional change intended.

Signed-off-by: Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com>
---
 drivers/i2c/busses/i2c-qcom-geni.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c
index d5c977e34994..96015e077b69 100644
--- a/drivers/i2c/busses/i2c-qcom-geni.c
+++ b/drivers/i2c/busses/i2c-qcom-geni.c
@@ -994,10 +994,8 @@ static int geni_i2c_init(struct geni_i2c_dev *gi2c)
 	int ret;
 
 	ret = pm_runtime_resume_and_get(gi2c->se.dev);
-	if (ret < 0) {
-		dev_err(gi2c->se.dev, "error turning on device :%d\n", ret);
-		return ret;
-	}
+	if (ret < 0)
+		return dev_err_probe(gi2c->se.dev, ret, "error turning on device\n");
 
 	proto = geni_se_read_proto(&gi2c->se);
 	if (proto == GENI_SE_INVALID_PROTO) {
-- 
2.43.0


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

end of thread, other threads:[~2026-09-10 20:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-05  7:00 [PATCH] i2c: qcom-geni: Simplify PM resume error handling Mukesh Kumar Savaliya
2026-08-05  9:37 ` Praveen Talari
2026-08-05  9:50   ` Mukesh Savaliya
2026-08-06 10:19 ` Praveen Talari
2026-08-07  8:33 ` Viken Dadhaniya
2026-09-10 20:51 ` Andi Shyti

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

all inboxes | Powered by JetHome®