build/patch/kernel/archive/sunxi-6.1/patches.megous/misc-ppkb-manager-Show-read-write-error-codes.patch

38 lines
1.2 KiB
Diff
Raw Permalink Normal View History

From 18cdae3106f0eb0f55b0449d9ac54c668720fd12 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Fri, 9 Dec 2022 21:53:51 +0100
Subject: [PATCH 337/389] misc: ppkb-manager: Show read/write error codes
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
drivers/misc/ppkb-manager.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/misc/ppkb-manager.c b/drivers/misc/ppkb-manager.c
index 2c8b99ee7aea..06b029233704 100644
--- a/drivers/misc/ppkb-manager.c
+++ b/drivers/misc/ppkb-manager.c
@@ -243,8 +243,8 @@ static int kbpwr_snaphost(struct kbpwr_dev *kbpwr, struct kbpwr_status* s)
* Other properties should never fail to read,
* so make that a fatal issue.
*/
- dev_err(kbpwr->dev, "Can't read %s\n", props[i].name);
- return -1;
+ dev_err(kbpwr->dev, "Can't read %s (%d)\n", props[i].name, ret);
+ return ret;
}
}
@@ -311,7 +311,7 @@ static int kbpwr_update(struct kbpwr_dev *kbpwr,
*/
ret = power_supply_set_property(props[i].psy, props[i].prop, &val);
if (ret) {
- dev_warn(kbpwr->dev, "Can't write %s\n", props[i].name);
+ dev_warn(kbpwr->dev, "Can't write %s (%d)\n", props[i].name, ret);
continue;
}
--
2.35.3