diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2018-04-20 13:13:52 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-05-09 23:15:59 +0300 |
commit | 6246c3a43bfde6b845290e397e35f1d7cd902050 (patch) | |
tree | 9bdada1489d72a5e21c4c0262d991afe037b64b6 /drivers/media/platform/davinci | |
parent | f6b6631478d7708d86dc0b268671d5191b96946e (diff) | |
download | linux-6246c3a43bfde6b845290e397e35f1d7cd902050.tar.xz |
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: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/platform/davinci')
-rw-r--r-- | drivers/media/platform/davinci/vpbe_venc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/davinci/vpbe_venc.c b/drivers/media/platform/davinci/vpbe_venc.c index 5c255de3b3f8..ba157827192c 100644 --- a/drivers/media/platform/davinci/vpbe_venc.c +++ b/drivers/media/platform/davinci/vpbe_venc.c @@ -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, const char *venc_name) { - struct venc_state *venc; + struct venc_state *venc = NULL; bus_for_each_dev(&platform_bus_type, NULL, &venc, venc_device_get); |