Commit bfba2b3e authored by Markus Elfring's avatar Markus Elfring Committed by Mauro Carvalho Chehab

media: omap_vout: Fix a possible null pointer dereference in omap_vout_open()

Move a debug message so that a null pointer access can not happen
for the variable "vout" in this function.

Fixes: 5c7ab634 ("V4L/DVB: V4L2: Add support for OMAP2/3 V4L2 display driver on top of DSS2")
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 1bfbb885
...@@ -1004,11 +1004,12 @@ static int omap_vout_open(struct file *file) ...@@ -1004,11 +1004,12 @@ static int omap_vout_open(struct file *file)
struct omap_vout_device *vout = NULL; struct omap_vout_device *vout = NULL;
vout = video_drvdata(file); vout = video_drvdata(file);
v4l2_dbg(1, debug, &vout->vid_dev->v4l2_dev, "Entering %s\n", __func__);
if (vout == NULL) if (vout == NULL)
return -ENODEV; return -ENODEV;
v4l2_dbg(1, debug, &vout->vid_dev->v4l2_dev, "Entering %s\n", __func__);
/* for now, we only support single open */ /* for now, we only support single open */
if (vout->opened) if (vout->opened)
return -EBUSY; return -EBUSY;
......
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