summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFigo.zhang <figo1802@gmail.com>2009-06-11 10:33:31 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-06-16 19:07:37 -0300
commit5e2c217eee18a4627a32c49f57f47dbac67dcf23 (patch)
tree7998db31b7a3e3617911705eb6e109c6de4c655d
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>
-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;
+
}
/************************************************************