Skip to content

Commit f72af77

Browse files
paulkocialkowskimchehab
authored andcommitted
media: sun6i-isp: proc: Error out on invalid port to fix warning
The enabled variable is only set for a valid port and used later, which triggers an uninitialized use smatch warning. Explicitly error out in that case to fix the warning. 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 504307f commit f72af77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ static int sun6i_isp_proc_notifier_bound(struct v4l2_async_notifier *notifier,
416416
enabled = !proc->source_csi0.expected;
417417
break;
418418
default:
419-
break;
419+
return -EINVAL;
420420
}
421421

422422
source->subdev = remote_subdev;

0 commit comments

Comments
 (0)