* [PATCH] media: vpbe_venc: potential uninitialized variable in ven_sub_dev_init()
@ 2018-04-20 10:13 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2018-04-20 10:13 UTC (permalink / raw)
To: Lad, Prabhakar; +Cc: Mauro Carvalho Chehab, linux-media, kernel-janitors
Smatch complains that "venc" could be unintialized. There a couple
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>
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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] media: vpbe_venc: potential uninitialized variable in ven_sub_dev_init()
@ 2018-04-20 10:13 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2018-04-20 10:13 UTC (permalink / raw)
To: Lad, Prabhakar; +Cc: Mauro Carvalho Chehab, linux-media, kernel-janitors
Smatch complains that "venc" could be unintialized. There a couple
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>
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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-04-20 10:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-20 10:13 [PATCH] media: vpbe_venc: potential uninitialized variable in ven_sub_dev_init() Dan Carpenter
2018-04-20 10:13 ` Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.