Skip to content

Commit 761ebeb

Browse files
paulkocialkowskimchehab
authored andcommitted
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>
1 parent 52109d9 commit 761ebeb

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,8 @@ static int sun8i_a83t_mipi_csi2_s_stream(struct v4l2_subdev *subdev, int on)
220220
return -ENODEV;
221221

222222
if (!on) {
223-
ret = v4l2_subdev_call(source_subdev, video, s_stream, 0);
223+
v4l2_subdev_call(source_subdev, video, s_stream, 0);
224+
ret = 0;
224225
goto disable;
225226
}
226227

@@ -312,8 +313,6 @@ static int sun8i_a83t_mipi_csi2_s_stream(struct v4l2_subdev *subdev, int on)
312313
return 0;
313314

314315
disable:
315-
if (!on)
316-
ret = 0;
317316
phy_power_off(dphy);
318317
sun8i_a83t_mipi_csi2_disable(csi2_dev);
319318

0 commit comments

Comments
 (0)