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 <paul.kocialkowski@bootlin.com>
Fixes: e3185e1d7c ("media: staging: media: Add support for the Allwinner A31 ISP")
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
This commit is contained in:
Paul Kocialkowski 2022-12-08 15:20:02 +01:00 committed by Mauro Carvalho Chehab
parent 504307f2b3
commit f72af77094
1 changed files with 1 additions and 1 deletions

View File

@ -416,7 +416,7 @@ static int sun6i_isp_proc_notifier_bound(struct v4l2_async_notifier *notifier,
enabled = !proc->source_csi0.expected;
break;
default:
break;
return -EINVAL;
}
source->subdev = remote_subdev;