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 <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
1 parent 52109d9 commit 761ebeb

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

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)