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>
This commit is contained in:
Figo.zhang 2009-06-11 10:33:31 -03:00 committed by Mauro Carvalho Chehab
parent f1ca0adfcf
commit 5e2c217eee

View File

@ -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;
}
/************************************************************