mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
media: i2c: max96717: 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/max96717.c:653:44-51: 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>
This commit is contained in:
committed by
Hans Verkuil
parent
3a57a0763b
commit
e8fd8080e7
@@ -650,7 +650,7 @@ static int max96717_v4l2_notifier_register(struct max96717_priv *priv)
|
|||||||
fwnode_handle_put(ep_fwnode);
|
fwnode_handle_put(ep_fwnode);
|
||||||
|
|
||||||
if (IS_ERR(asd)) {
|
if (IS_ERR(asd)) {
|
||||||
dev_err(dev, "Failed to add subdev: %ld", PTR_ERR(asd));
|
dev_err(dev, "Failed to add subdev: %pe", asd);
|
||||||
v4l2_async_nf_cleanup(&priv->notifier);
|
v4l2_async_nf_cleanup(&priv->notifier);
|
||||||
return PTR_ERR(asd);
|
return PTR_ERR(asd);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user