Skip to content

Commit

Permalink
V4L/DVB (11958): usbvision-core.c: vfree does its own NULL check
Browse files Browse the repository at this point in the history
vfree() does it's own NULL checking,so no need for check before
calling it.

Signed-off-by: Figo.zhang <[email protected]>
Signed-off-by: Douglas Schilling Landgraf <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
Figo1802 authored and Mauro Carvalho Chehab committed Jun 16, 2009
1 parent f1ca0ad commit 5e2c217
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions drivers/media/video/usbvision/usbvision-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

}

/*
Expand Down Expand Up @@ -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;

}

/************************************************************
Expand Down

0 comments on commit 5e2c217

Please sign in to comment.