* [PATCH] HID: pulsar: print the battery error with %pe
@ 2026-11-04 15:00 Aryan Sinha
0 siblings, 0 replies; only message in thread
From: Aryan Sinha @ 2026-11-04 15:00 UTC (permalink / raw)
To: Jiri Kosina, Benjamin Tissoires
Cc: Nikolas Koesling, linux-input, linux-kernel, Aryan Sinha
%pe prints the symbolic errno, which is easier to read than the raw
number from the PTR_ERR().
Signed-off-by: Aryan Sinha <sinha.aryan03@gmail.com>
---
drivers/hid/hid-pulsar.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/hid/hid-pulsar.c b/drivers/hid/hid-pulsar.c
index b0b34849f..ba7cc9f65 100644
--- a/drivers/hid/hid-pulsar.c
+++ b/drivers/hid/hid-pulsar.c
@@ -615,8 +615,8 @@ static void pulsar_init_work(struct work_struct *work)
devm_power_supply_register(&hdev->dev, &drvdata->battery.desc,
&psy_cfg);
if (IS_ERR(drvdata->battery.ps)) {
- hid_err(hdev, "failed to register battery: %ld\n",
- PTR_ERR(drvdata->battery.ps));
+ hid_err(hdev, "failed to register battery: %pe\n",
+ drvdata->battery.ps);
drvdata->battery.ps = NULL;
return;
}
--
2.46.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-04 15:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-04 15:00 [PATCH] HID: pulsar: print the battery error with %pe Aryan Sinha
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®