38 lines
1.2 KiB
Diff
38 lines
1.2 KiB
Diff
From cf6afbcaf7c32e6753bec7cd44b43f98080fc527 Mon Sep 17 00:00:00 2001
|
|
From: Ondrej Jirman <megi@xff.cz>
|
|
Date: Fri, 9 Dec 2022 21:53:51 +0100
|
|
Subject: [PATCH 387/464] 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 b4c7a03b6b1d..8d6721d78398 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.34.1
|
|
|