diff options
author | 2022-12-08 15:19:56 +0100 | |
---|---|---|
committer | 2022-12-12 11:36:00 +0100 | |
commit | f523c655325c3da085527804650708c7ab6730e3 (patch) | |
tree | c66ee980d84e88862cf42c872f6f430a7bc0a47f /drivers/media/platform/sunxi | |
parent | Merge tag 'br-v6.2i' of git://linuxtv.org/hverkuil/media_tree into media_stage (diff) | |
download | linux-f523c655325c3da085527804650708c7ab6730e3.tar.gz linux-f523c655325c3da085527804650708c7ab6730e3.tar.bz2 linux-f523c655325c3da085527804650708c7ab6730e3.zip |
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 <paul.kocialkowski@bootlin.com>
Fixes: 0d2b746b1bef ("media: sun6i-csi: Add bridge v4l2 subdev with port management")
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media/platform/sunxi')
-rw-r--r-- | drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c index ebfc870d2af5..4db950973ce2 100644 --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c @@ -663,7 +663,7 @@ sun6i_csi_bridge_notifier_bound(struct v4l2_async_notifier *notifier, enabled = !bridge->source_parallel.expected; break; default: - break; + return -EINVAL; } source->subdev = remote_subdev; |