Skip to content

Commit 295e3be

Browse files
ribaldadtor
authored andcommitted
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>
1 parent c7866ee commit 295e3be

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/input/touchscreen/cyttsp5.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -923,8 +923,8 @@ static int cyttsp5_i2c_probe(struct i2c_client *client)
923923

924924
regmap = devm_regmap_init_i2c(client, &config);
925925
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);
928928
return PTR_ERR(regmap);
929929
}
930930

0 commit comments

Comments
 (0)