Skip to contentSkip to conversation

HID: corsair-void: Use %pe for printing PTR_ERR

PATCH Applied Stuart Hayhurst 2 participants 2 messages Nov 3, 2025 – Nov 18, 2025 HID

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 HID: corsair-void: Use %pe for printing PTR_ERR

Use %pe to print a PTR_ERR to silence a cocci warning

---
 drivers/hid/hid-corsair-void.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/hid/hid-corsair-void.c +2 -3
index fee134a7eba3..5e9a5b8f7f16 100644
@@ -553,9 +553,8 @@ static void corsair_void_add_battery(struct corsair_void_drvdata *drvdata)
 
 	if (IS_ERR(new_supply)) {
 		hid_err(drvdata->hid_dev,
-			"failed to register battery '%s' (reason: %ld)\n",
-			drvdata->battery_desc.name,
-			PTR_ERR(new_supply));
+			"failed to register battery '%s' (reason: %pe)\n",
+			drvdata->battery_desc.name, new_supply);
 		return;
 	}
 
Signature · 1 line
2.51.0