Skip to content

Commit 504307f

Browse files
paulkocialkowskimchehab
authored andcommitted
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 <[email protected]> Fixes: e3185e1 ("media: staging: media: Add support for the Allwinner A31 ISP") Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
1 parent 761ebeb commit 504307f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,7 @@ static int sun6i_isp_proc_s_stream(struct v4l2_subdev *subdev, int on)
173173
struct sun6i_isp_proc_source *source;
174174
struct v4l2_subdev *source_subdev;
175175
struct media_pad *remote_pad;
176-
/* Initialize to 0 to use both in disable label (ret != 0) and off. */
177-
int ret = 0;
176+
int ret;
178177

179178
/* Source */
180179

@@ -195,6 +194,7 @@ static int sun6i_isp_proc_s_stream(struct v4l2_subdev *subdev, int on)
195194
if (!on) {
196195
sun6i_isp_proc_irq_disable(isp_dev);
197196
v4l2_subdev_call(source_subdev, video, s_stream, 0);
197+
ret = 0;
198198
goto disable;
199199
}
200200

0 commit comments

Comments
 (0)