From c8bd4280247033a1e83022d0fe44cd782ea7e299 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Fri, 9 Dec 2022 21:53:51 +0100
Subject: [PATCH 404/463] 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 56fa677d00fd6..d0453bcc7a59e 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.46.0

