Skip to content

Commit

Permalink
media: sun6i-isp: proc: Error out on invalid port to fix warning
Browse files Browse the repository at this point in the history
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: e3185e1 ("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>
  • Loading branch information
Paul Kocialkowski authored and Mauro Carvalho Chehab committed Dec 14, 2022
1 parent 504307f commit f72af77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f72af77

Please sign in to comment.