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

media: i2c: st-mipid02: 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:
./i2c/st-mipid02.c:751:3-10: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>

authored by

Ricardo Ribalda and committed by
Hans Verkuil
8bcc9138 7f457b28

+2 -2
+2 -2
drivers/media/i2c/st-mipid02.c
··· 747 747 of_node_put(ep_node); 748 748 749 749 if (IS_ERR(asd)) { 750 - dev_err(&client->dev, "fail to register asd to notifier %ld", 751 - PTR_ERR(asd)); 750 + dev_err(&client->dev, "fail to register asd to notifier %pe", 751 + asd); 752 752 return PTR_ERR(asd); 753 753 } 754 754 bridge->notifier.ops = &mipid02_notifier_ops;