mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 01:10:04 +00:00
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 <paul.kocialkowski@bootlin.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
This commit is contained in:
parent
f2c174e501
commit
52109d91d2
1 changed files with 2 additions and 3 deletions
|
@ -188,7 +188,8 @@ static int sun6i_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;
|
||||
}
|
||||
|
||||
|
@ -280,8 +281,6 @@ static int sun6i_mipi_csi2_s_stream(struct v4l2_subdev *subdev, int on)
|
|||
return 0;
|
||||
|
||||
disable:
|
||||
if (!on)
|
||||
ret = 0;
|
||||
phy_power_off(dphy);
|
||||
sun6i_mipi_csi2_disable(csi2_dev);
|
||||
|
||||
|
|
Loading…
Reference in a new issue