Skip to content

Commit 7fabed7

Browse files
paulkocialkowskimchehab
authored andcommitted
media: sun6i-csi: bridge: 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: 0d2b746 ("media: sun6i-csi: Add bridge v4l2 subdev with port management") Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
1 parent 73278d4 commit 7fabed7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ sun6i_csi_bridge_notifier_bound(struct v4l2_async_notifier *notifier,
663663
enabled = !bridge->source_parallel.expected;
664664
break;
665665
default:
666-
break;
666+
return -EINVAL;
667667
}
668668

669669
source->subdev = remote_subdev;

0 commit comments

Comments
 (0)