diff options
author | Paul Kocialkowski <paul.kocialkowski@bootlin.com> | 2022-12-08 17:20:01 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2022-12-14 21:12:31 +0300 |
commit | 504307f2b3ae2625ed591efe073c2d14d568dfc8 (patch) | |
tree | e5f978cd9b96afecf4603c59e37dd38a5da4ebef /drivers/staging | |
parent | 761ebebabd0953fde1e6b77d6ff54356dc1639c4 (diff) | |
download | linux-504307f2b3ae2625ed591efe073c2d14d568dfc8.tar.xz |
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: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Fixes: e3185e1d7c14 ("media: staging: media: Add support for the Allwinner A31 ISP")
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c index d69d2be0add2..a95709d2c573 100644 --- a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c +++ b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c @@ -173,8 +173,7 @@ static int sun6i_isp_proc_s_stream(struct v4l2_subdev *subdev, int on) struct sun6i_isp_proc_source *source; struct v4l2_subdev *source_subdev; struct media_pad *remote_pad; - /* Initialize to 0 to use both in disable label (ret != 0) and off. */ - int ret = 0; + int ret; /* Source */ @@ -195,6 +194,7 @@ static int sun6i_isp_proc_s_stream(struct v4l2_subdev *subdev, int on) if (!on) { sun6i_isp_proc_irq_disable(isp_dev); v4l2_subdev_call(source_subdev, video, s_stream, 0); + ret = 0; goto disable; } |