summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/zr364xx.c
diff options
context:
space:
mode:
authorFigo.zhang <figo1802@gmail.com>2009-06-06 11:16:21 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-06-17 00:07:53 +0200
commitde99d76aa19994f0d1140b1397fc439525e147c0 (patch)
treed3d8620e40f39b36b3688fb0d3c68566750311a2 /drivers/media/video/zr364xx.c
parentV4L/DVB (11993): V4L/pwc - use usb_interface as parent, not usb_device (diff)
downloadlinux-de99d76aa19994f0d1140b1397fc439525e147c0.tar.xz
linux-de99d76aa19994f0d1140b1397fc439525e147c0.zip
V4L/DVB (11995): zr364xx.c: vfree does its own NULL check
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 'drivers/media/video/zr364xx.c')
-rw-r--r--drivers/media/video/zr364xx.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/video/zr364xx.c b/drivers/media/video/zr364xx.c
index ac169c9eb18d..fc976f42f432 100644
--- a/drivers/media/video/zr364xx.c
+++ b/drivers/media/video/zr364xx.c
@@ -882,9 +882,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;
}