Skip to content

Commit 52109d9

Browse files
paulkocialkowskimchehab
authored andcommitted
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 <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
1 parent f2c174e commit 52109d9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/media/platform/sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,8 @@ static int sun6i_mipi_csi2_s_stream(struct v4l2_subdev *subdev, int on)
188188
return -ENODEV;
189189

190190
if (!on) {
191-
ret = v4l2_subdev_call(source_subdev, video, s_stream, 0);
191+
v4l2_subdev_call(source_subdev, video, s_stream, 0);
192+
ret = 0;
192193
goto disable;
193194
}
194195

@@ -280,8 +281,6 @@ static int sun6i_mipi_csi2_s_stream(struct v4l2_subdev *subdev, int on)
280281
return 0;
281282

282283
disable:
283-
if (!on)
284-
ret = 0;
285284
phy_power_off(dphy);
286285
sun6i_mipi_csi2_disable(csi2_dev);
287286

0 commit comments

Comments
 (0)