diff options
author | Paul Kocialkowski <paul.kocialkowski@bootlin.com> | 2022-12-08 15:19:59 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2022-12-14 19:12:31 +0100 |
commit | 52109d91d2f91e9cc7a14ee46443e374a21573cf (patch) | |
tree | 199f1ceb1b9f2e772df329c842dfe5a745e75c6e /drivers | |
parent | media: sun6i-csi: capture: Remove useless ret initialization (diff) | |
download | linux-52109d91d2f91e9cc7a14ee46443e374a21573cf.tar.xz linux-52109d91d2f91e9cc7a14ee46443e374a21573cf.zip |
media: sun6i-mipi-csi2: Clarify return code handling in stream off path
Explicitly set ret to zero instead of assigning it and overwriting it
later, which is a bit confusing to understand.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/platform/sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/platform/sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c b/drivers/media/platform/sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c index 484ac5f054d5..a220ce849b41 100644 --- a/drivers/media/platform/sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c +++ b/drivers/media/platform/sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c @@ -188,7 +188,8 @@ static int sun6i_mipi_csi2_s_stream(struct v4l2_subdev *subdev, int on) return -ENODEV; if (!on) { - ret = v4l2_subdev_call(source_subdev, video, s_stream, 0); + v4l2_subdev_call(source_subdev, video, s_stream, 0); + ret = 0; goto disable; } @@ -280,8 +281,6 @@ static int sun6i_mipi_csi2_s_stream(struct v4l2_subdev *subdev, int on) return 0; disable: - if (!on) - ret = 0; phy_power_off(dphy); sun6i_mipi_csi2_disable(csi2_dev); |