diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-11-12 05:05:15 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-11-12 05:05:15 +0000 |
commit | 0b65108ee51fa8796b38304395fc9bd64321d98b (patch) | |
tree | a6be308e1703dc430e5bf91aac7f0a8c91434613 /linux/drivers/media/video/em28xx/em28xx-video.c | |
parent | 215aa89455a6032cdf605bdd4b5064b8c14b8067 (diff) | |
download | mediapointer-dvb-s2-0b65108ee51fa8796b38304395fc9bd64321d98b.tar.gz mediapointer-dvb-s2-0b65108ee51fa8796b38304395fc9bd64321d98b.tar.bz2 |
Fix possible null pointer dereference in info message
From: Devin Heitmueller <devin.heitmueller@gmail.com>
Fix possible null pointer dereference in info message
Fix case where we could end up dereferencing a NULL pointer if dev->vdev or
dev->vbi_dev were not set properly.
Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/em28xx/em28xx-video.c')
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx-video.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-video.c b/linux/drivers/media/video/em28xx/em28xx-video.c index a4493da8a..040ea9ef3 100644 --- a/linux/drivers/media/video/em28xx/em28xx-video.c +++ b/linux/drivers/media/video/em28xx/em28xx-video.c @@ -1656,8 +1656,6 @@ static void em28xx_release_resources(struct em28xx *dev) /*FIXME: I2C IR should be disconnected */ - em28xx_info("V4L2 devices /dev/video%d and /dev/vbi%d deregistered\n", - dev->vdev->num, dev->vbi_dev->num); list_del(&dev->devlist); if (dev->sbutton_input_dev) em28xx_deregister_snapshot_button(dev); @@ -1669,6 +1667,8 @@ static void em28xx_release_resources(struct em28xx *dev) dev->radio_dev = NULL; } if (dev->vbi_dev) { + em28xx_info("V4L2 device /dev/vbi%d deregistered\n", + dev->vbi_dev->num); if (-1 != dev->vbi_dev->minor) video_unregister_device(dev->vbi_dev); else @@ -1676,6 +1676,8 @@ static void em28xx_release_resources(struct em28xx *dev) dev->vbi_dev = NULL; } if (dev->vdev) { + em28xx_info("V4L2 device /dev/video%d deregistered\n", + dev->vdev->num); if (-1 != dev->vdev->minor) video_unregister_device(dev->vdev); else |