Commit 7fabed7a authored by Paul Kocialkowski's avatar Paul Kocialkowski Committed by Mauro Carvalho Chehab

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: default avatarPaul Kocialkowski <paul.kocialkowski@bootlin.com>
Fixes: 0d2b746b ("media: sun6i-csi: Add bridge v4l2 subdev with port management")
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parent 73278d48
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment