Commit 761ebeba authored by Paul Kocialkowski's avatar Paul Kocialkowski Committed by Mauro Carvalho Chehab

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: default avatarPaul Kocialkowski <paul.kocialkowski@bootlin.com>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parent 52109d91
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment