summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Ribalda <ribalda@chromium.org>2025-10-13 17:15:06 +0300
committerHans Verkuil <hverkuil+cisco@kernel.org>2025-10-17 12:31:16 +0300
commite374b123ca602060c018a029f508dc175b8ba5b3 (patch)
tree1561e50aedd1536ae859d1ae46e09cd870d25991
parent53d94ec2eabf458cfb49ad3dce059e02bd85ae12 (diff)
downloadlinux-e374b123ca602060c018a029f508dc175b8ba5b3.tar.xz
media: platform: rzg2l-cru: 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: ./platform/renesas/rzg2l-cru/rzg2l-csi2.c:307:30-37: WARNING: Consider using %pe to print PTR_ERR() ./platform/renesas/rzg2l-cru/rzg2l-csi2.c:726:30-37: 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>
-rw-r--r--drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
index 1520211e7418..0fbdae280fdc 100644
--- a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
+++ b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
@@ -303,8 +303,8 @@ static int rzg2l_csi2_calc_mbps(struct rzg2l_csi2 *csi2)
remote_pad = media_pad_remote_pad_unique(&csi2->pads[RZG2L_CSI2_SINK]);
if (IS_ERR(remote_pad)) {
- dev_err(csi2->dev, "can't get source pad of %s (%ld)\n",
- csi2->remote_source->name, PTR_ERR(remote_pad));
+ dev_err(csi2->dev, "can't get source pad of %s (%pe)\n",
+ csi2->remote_source->name, remote_pad);
return PTR_ERR(remote_pad);
}
@@ -722,8 +722,8 @@ static int rzg2l_csi2_get_frame_desc(struct v4l2_subdev *sd, unsigned int pad,
remote_pad = media_pad_remote_pad_unique(&csi2->pads[RZG2L_CSI2_SINK]);
if (IS_ERR(remote_pad)) {
- dev_err(csi2->dev, "can't get source pad of %s (%ld)\n",
- csi2->remote_source->name, PTR_ERR(remote_pad));
+ dev_err(csi2->dev, "can't get source pad of %s (%pe)\n",
+ csi2->remote_source->name, remote_pad);
return PTR_ERR(remote_pad);
}
return v4l2_subdev_call(csi2->remote_source, pad, get_frame_desc,