aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/usbvision
diff options
context:
space:
mode:
authorFigo.zhang <figo1802@gmail.com>2009-06-11 09:33:31 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-06-16 18:07:37 -0400
commit5e2c217eee18a4627a32c49f57f47dbac67dcf23 (patch)
tree7998db31b7a3e3617911705eb6e109c6de4c655d /drivers/media/video/usbvision
parentf1ca0adfcf2c2f1129a59b93caa80a1dbd6b6c81 (diff)
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)
390 390
391void usbvision_scratch_free(struct usb_usbvision *usbvision) 391void usbvision_scratch_free(struct usb_usbvision *usbvision)
392{ 392{
393 if (usbvision->scratch != NULL) { 393 vfree(usbvision->scratch);
394 vfree(usbvision->scratch); 394 usbvision->scratch = NULL;
395 usbvision->scratch = NULL; 395
396 }
397} 396}
398 397
399/* 398/*
@@ -506,10 +505,9 @@ int usbvision_decompress_alloc(struct usb_usbvision *usbvision)
506 */ 505 */
507void usbvision_decompress_free(struct usb_usbvision *usbvision) 506void usbvision_decompress_free(struct usb_usbvision *usbvision)
508{ 507{
509 if (usbvision->IntraFrameBuffer != NULL) { 508 vfree(usbvision->IntraFrameBuffer);
510 vfree(usbvision->IntraFrameBuffer); 509 usbvision->IntraFrameBuffer = NULL;
511 usbvision->IntraFrameBuffer = NULL; 510
512 }
513} 511}
514 512
515/************************************************************ 513/************************************************************