HID: corsair-void: Use %pe for printing PTR_ERR
PATCH 1/1 HID: corsair-void: Use %pe for printing PTR_ERR
Use %pe to print a PTR_ERR to silence a cocci warning
Reported-by kernel test robot <[email protected]>
Reported-by Julia Lawall <[email protected]>
Signed-off-by Stuart Hayhurst <[email protected]>
--- drivers/hid/hid-corsair-void.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/hid/hid-corsair-void.c +2 -3
@@ -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
Quoted 6 lines · Stuart Hayhurst
Use %pe to print a
PTR_ERRto silence a cocci warningReported-by kernel test robot <[email protected]>Reported-by Julia Lawall <[email protected]>Signed-off-by Stuart Hayhurst <[email protected]>
Applied, thanks.
Signature · 2 lines
Jiri Kosina SUSE Labs