mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:24:45 +01:00
media: i2c: max9286: 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/max9286.c:755:7-14: WARNING: Consider using %pe to print PTR_ERR() Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
parent
f7be2c2e59
commit
3a57a0763b
1 changed files with 2 additions and 2 deletions
|
|
@ -751,8 +751,8 @@ static int max9286_v4l2_notifier_register(struct max9286_priv *priv)
|
|||
mas = v4l2_async_nf_add_fwnode(&priv->notifier, source->fwnode,
|
||||
struct max9286_asd);
|
||||
if (IS_ERR(mas)) {
|
||||
dev_err(dev, "Failed to add subdev for source %u: %ld",
|
||||
i, PTR_ERR(mas));
|
||||
dev_err(dev, "Failed to add subdev for source %u: %pe",
|
||||
i, mas);
|
||||
v4l2_async_nf_cleanup(&priv->notifier);
|
||||
return PTR_ERR(mas);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue