From: Ricardo Ribalda Date: Mon, 13 Oct 2025 14:14:41 +0000 (+0000) Subject: Input: cyttsp5 - use %pe format specifier X-Git-Tag: v6.19-rc1~38^2^2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=295e3beead10e96c1feda7ed145113bb9191e296;p=thirdparty%2Fkernel%2Flinux.git 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 Link: https://patch.msgid.link/20251013-ptr_err-v1-1-2c5efbd82952@chromium.org Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/touchscreen/cyttsp5.c b/drivers/input/touchscreen/cyttsp5.c index 071b7c9bf566e..47f4271395a69 100644 --- a/drivers/input/touchscreen/cyttsp5.c +++ b/drivers/input/touchscreen/cyttsp5.c @@ -923,8 +923,8 @@ static int cyttsp5_i2c_probe(struct i2c_client *client) regmap = devm_regmap_init_i2c(client, &config); if (IS_ERR(regmap)) { - dev_err(&client->dev, "regmap allocation failed: %ld\n", - PTR_ERR(regmap)); + dev_err(&client->dev, "regmap allocation failed: %pe\n", + regmap); return PTR_ERR(regmap); }