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

Input: cyttsp5 - use %pe format specifier

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR()

This patch fixes this cocci report:
./cyttsp5.c:927:3-10: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Link: https://patch.msgid.link/20251013-ptr_err-v1-1-2c5efbd82952@chromium.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Ricardo Ribalda and committed by
Dmitry Torokhov
295e3bee c7866ee0

+2 -2
+2 -2
drivers/input/touchscreen/cyttsp5.c
··· 923 923 924 924 regmap = devm_regmap_init_i2c(client, &config); 925 925 if (IS_ERR(regmap)) { 926 - dev_err(&client->dev, "regmap allocation failed: %ld\n", 927 - PTR_ERR(regmap)); 926 + dev_err(&client->dev, "regmap allocation failed: %pe\n", 927 + regmap); 928 928 return PTR_ERR(regmap); 929 929 } 930 930