Commit 6246c3a4 authored by Dan Carpenter's avatar Dan Carpenter Committed by Mauro Carvalho Chehab

media: vpbe_venc: potential uninitialized variable in ven_sub_dev_init()

Smatch complains that "venc" could be uninitialized.  There are a couple
of error paths where it looks like maybe that could happen.  I don't know
if it's really a bug, but it's reasonable to set "venc" to NULL and
silence the warning.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent f6b66314
...@@ -606,7 +606,7 @@ static int venc_device_get(struct device *dev, void *data) ...@@ -606,7 +606,7 @@ static int venc_device_get(struct device *dev, void *data)
struct v4l2_subdev *venc_sub_dev_init(struct v4l2_device *v4l2_dev, struct v4l2_subdev *venc_sub_dev_init(struct v4l2_device *v4l2_dev,
const char *venc_name) const char *venc_name)
{ {
struct venc_state *venc; struct venc_state *venc = NULL;
bus_for_each_dev(&platform_bus_type, NULL, &venc, bus_for_each_dev(&platform_bus_type, NULL, &venc,
venc_device_get); venc_device_get);
......
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