summaryrefslogtreecommitdiff
path: root/drivers/media/video/usbvision
diff options
context:
space:
mode:
authorFigo.zhang <figo1802@gmail.com>2009-06-11 17:33:31 +0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-06-17 02:07:37 +0400
commit5e2c217eee18a4627a32c49f57f47dbac67dcf23 (patch)
tree7998db31b7a3e3617911705eb6e109c6de4c655d /drivers/media/video/usbvision
parentf1ca0adfcf2c2f1129a59b93caa80a1dbd6b6c81 (diff)
downloadlinux-5e2c217eee18a4627a32c49f57f47dbac67dcf23.tar.xz
V4L/DVB (11958): usbvision-core.c: vfree does its own NULL check
vfree() does it's own NULL checking,so no need for check before calling it. Signed-off-by: Figo.zhang <figo1802@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/usbvision')
-rw-r--r--drivers/media/video/usbvision/usbvision-core.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/media/video/usbvision/usbvision-core.c b/drivers/media/video/usbvision/usbvision-core.c
index 8bc03b9e1315..6ba16abeebdd 100644
--- a/drivers/media/video/usbvision/usbvision-core.c
+++ b/drivers/media/video/usbvision/usbvision-core.c
@@ -390,10 +390,9 @@ int usbvision_scratch_alloc(struct usb_usbvision *usbvision)
void usbvision_scratch_free(struct usb_usbvision *usbvision)
{
- if (usbvision->scratch != NULL) {
- vfree(usbvision->scratch);
- usbvision->scratch = NULL;
- }
+ vfree(usbvision->scratch);
+ usbvision->scratch = NULL;
+
}
/*
@@ -506,10 +505,9 @@ int usbvision_decompress_alloc(struct usb_usbvision *usbvision)
*/
void usbvision_decompress_free(struct usb_usbvision *usbvision)
{
- if (usbvision->IntraFrameBuffer != NULL) {
- vfree(usbvision->IntraFrameBuffer);
- usbvision->IntraFrameBuffer = NULL;
- }
+ vfree(usbvision->IntraFrameBuffer);
+ usbvision->IntraFrameBuffer = NULL;
+
}
/************************************************************