Commit 504307f2 authored by Paul Kocialkowski's avatar Paul Kocialkowski Committed by Mauro Carvalho Chehab

media: sun6i-isp: proc: Fix return code handling in stream off path

Explicitly set ret to zero on disable path to avoid a related smatch
warning. This makes initialization at declaration useless.
Signed-off-by: default avatarPaul Kocialkowski <paul.kocialkowski@bootlin.com>
Fixes: e3185e1d ("media: staging: media: Add support for the Allwinner A31 ISP")
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parent 761ebeba
...@@ -173,8 +173,7 @@ static int sun6i_isp_proc_s_stream(struct v4l2_subdev *subdev, int on) ...@@ -173,8 +173,7 @@ static int sun6i_isp_proc_s_stream(struct v4l2_subdev *subdev, int on)
struct sun6i_isp_proc_source *source; struct sun6i_isp_proc_source *source;
struct v4l2_subdev *source_subdev; struct v4l2_subdev *source_subdev;
struct media_pad *remote_pad; struct media_pad *remote_pad;
/* Initialize to 0 to use both in disable label (ret != 0) and off. */ int ret;
int ret = 0;
/* Source */ /* Source */
...@@ -195,6 +194,7 @@ static int sun6i_isp_proc_s_stream(struct v4l2_subdev *subdev, int on) ...@@ -195,6 +194,7 @@ static int sun6i_isp_proc_s_stream(struct v4l2_subdev *subdev, int on)
if (!on) { if (!on) {
sun6i_isp_proc_irq_disable(isp_dev); sun6i_isp_proc_irq_disable(isp_dev);
v4l2_subdev_call(source_subdev, video, s_stream, 0); v4l2_subdev_call(source_subdev, video, s_stream, 0);
ret = 0;
goto disable; goto disable;
} }
......
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