38 lines
1.2 KiB
Diff
38 lines
1.2 KiB
Diff
From 800b43a09c7e898fbe0156ebe72b27d1abded4cd Mon Sep 17 00:00:00 2001
|
|
From: Ondrej Jirman <megi@xff.cz>
|
|
Date: Fri, 9 Dec 2022 21:53:51 +0100
|
|
Subject: [PATCH 378/391] 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 2c8b99ee7..06b029233 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
|
|
|