diff options
author | Paul Kocialkowski <paul.kocialkowski@bootlin.com> | 2022-12-08 17:20:00 +0300 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2022-12-12 13:36:00 +0300 |
commit | 73402fd7ac098495cfb9b38132f3c174b8d8e6f2 (patch) | |
tree | 389c4fda0ca6742da52d01e581f8fb7e79d9a57c /drivers/media/platform/sunxi | |
parent | 1607a95c0d81842ff3db8df9543a9bb5492d480a (diff) | |
download | linux-73402fd7ac098495cfb9b38132f3c174b8d8e6f2.tar.xz |
media: sun8i-a83t-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/media/platform/sunxi')
-rw-r--r-- | drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c b/drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c index d993c09a4820..cd2e92ae2293 100644 --- a/drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c +++ b/drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c @@ -220,7 +220,8 @@ static int sun8i_a83t_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; } @@ -312,8 +313,6 @@ static int sun8i_a83t_mipi_csi2_s_stream(struct v4l2_subdev *subdev, int on) return 0; disable: - if (!on) - ret = 0; phy_power_off(dphy); sun8i_a83t_mipi_csi2_disable(csi2_dev); |