mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 02:24:24 +02:00
media: rkisp1: 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/rockchip/rkisp1/rkisp1-isp.c:940:3-10: WARNING: Consider using %pe to print PTR_ERR() ./platform/rockchip/rkisp1/rkisp1-csi.c:372: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>
This commit is contained in:
parent
66725aa506
commit
34cfce1dd5
|
|
@ -368,8 +368,8 @@ static int rkisp1_csi_s_stream(struct v4l2_subdev *sd, int enable)
|
|||
|
||||
source_pad = media_entity_remote_source_pad_unique(&sd->entity);
|
||||
if (IS_ERR(source_pad)) {
|
||||
dev_dbg(rkisp1->dev, "Failed to get source for CSI: %ld\n",
|
||||
PTR_ERR(source_pad));
|
||||
dev_dbg(rkisp1->dev, "Failed to get source for CSI: %pe\n",
|
||||
source_pad);
|
||||
return -EPIPE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -936,8 +936,8 @@ static int rkisp1_isp_s_stream(struct v4l2_subdev *sd, int enable)
|
|||
sink_pad = &isp->pads[RKISP1_ISP_PAD_SINK_VIDEO];
|
||||
source_pad = media_pad_remote_pad_unique(sink_pad);
|
||||
if (IS_ERR(source_pad)) {
|
||||
dev_dbg(rkisp1->dev, "Failed to get source for ISP: %ld\n",
|
||||
PTR_ERR(source_pad));
|
||||
dev_dbg(rkisp1->dev, "Failed to get source for ISP: %pe\n",
|
||||
source_pad);
|
||||
return -EPIPE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user