Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@inria.fr>
Closes: https://lore.kernel.org/r/202510300342.WtPn2jF3-lkp@intel.com/
Signed-off-by: Stuart Hayhurst <stuart.a.hayhurst@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>

authored by

Stuart Hayhurst and committed by
Jiri Kosina
4e127a74 cdcbb8e8

+2 -3
+2 -3
drivers/hid/hid-corsair-void.c
··· 553 553 554 554 if (IS_ERR(new_supply)) { 555 555 hid_err(drvdata->hid_dev, 556 - "failed to register battery '%s' (reason: %ld)\n", 557 - drvdata->battery_desc.name, 558 - PTR_ERR(new_supply)); 556 + "failed to register battery '%s' (reason: %pe)\n", 557 + drvdata->battery_desc.name, new_supply); 559 558 return; 560 559 } 561 560