[PATCH 04/16] media: rkisp1: Drop an unnecessary variable
Daniel Scally
dan.scally at ideasonboard.com
Mon Nov 2 23:40:40 PST 2026
The source_pad variable in rkisp1_subdev_notifier_bound() is not
needed, and dropping it will make an upcoming change involving error
handling in this function more simple; drop it.
Signed-off-by: Daniel Scally <dan.scally at ideasonboard.com>
---
drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
index f90e01301943c73963744929570d0e6ba4e3fd2b..2efbe6140da71a51077d7d4aa2352ef95497ebe2 100644
--- a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
+++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
@@ -132,23 +132,22 @@ static int rkisp1_subdev_notifier_bound(struct v4l2_async_notifier *notifier,
container_of(notifier, struct rkisp1_device, notifier);
struct rkisp1_sensor_async *s_asd =
container_of(asc, struct rkisp1_sensor_async, asd);
- int source_pad;
int ret;
s_asd->sd = sd;
- source_pad = media_entity_get_fwnode_pad(&sd->entity, s_asd->source_ep,
- MEDIA_PAD_FL_SOURCE);
- if (source_pad < 0) {
+ ret = media_entity_get_fwnode_pad(&sd->entity, s_asd->source_ep,
+ MEDIA_PAD_FL_SOURCE);
+ if (ret < 0) {
dev_err(rkisp1->dev, "failed to find source pad for %s\n",
sd->name);
- return source_pad;
+ return ret;
}
if (s_asd->port == 0)
- return rkisp1_csi_link_sensor(rkisp1, sd, s_asd, source_pad);
+ return rkisp1_csi_link_sensor(rkisp1, sd, s_asd, ret);
- ret = media_create_pad_link(&sd->entity, source_pad,
+ ret = media_create_pad_link(&sd->entity, ret,
&rkisp1->isp.sd.entity,
RKISP1_ISP_PAD_SINK_VIDEO,
!s_asd->index ? MEDIA_LNK_FL_ENABLED : 0);
--
2.43.0
More information about the linux-arm-kernel
mailing list