summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-06-06 09:16:21 +0000
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-06-06 09:16:21 +0000
commit66d1ec994cb3e98d73a7847d6cd516aceebd6fdf (patch)
tree7ea920ba8f38110b7893378dc073b16604f20032 /linux/drivers/media/video
parente3f49481ec12d850c2290cad0d7ebd61b0e8d8e6 (diff)
downloadmediapointer-dvb-s2-66d1ec994cb3e98d73a7847d6cd516aceebd6fdf.tar.gz
mediapointer-dvb-s2-66d1ec994cb3e98d73a7847d6cd516aceebd6fdf.tar.bz2
zr364xx.c: vfree does its own NULL check
From: Figo.zhang <figo1802@gmail.com> vfree() does it's own NULL checking, no need for explicit check before calling it. Signed-off-by: Figo.zhang <figo1802@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/zr364xx.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/linux/drivers/media/video/zr364xx.c b/linux/drivers/media/video/zr364xx.c
index b8f47acab..8746f067d 100644
--- a/linux/drivers/media/video/zr364xx.c
+++ b/linux/drivers/media/video/zr364xx.c
@@ -883,9 +883,11 @@ static void zr364xx_disconnect(struct usb_interface *intf)
video_unregister_device(cam->vdev);
cam->vdev = NULL;
kfree(cam->buffer);
- if (cam->framebuf)
- vfree(cam->framebuf);
+ cam->buffer = NULL;
+ vfree(cam->framebuf);
+ cam->framebuf = NULL;
kfree(cam);
+ cam = NULL;
}