diff mbox

usbvision-core.c: vfree does its own NULL check

Message ID 1244282809.3185.14.camel@myhost (mailing list archive)
State Accepted
Delegated to: Douglas Landgraf
Headers show

Commit Message

Figo.zhang June 6, 2009, 10:06 a.m. UTC
vfree() does it's own NULL checking,so no need for check before
calling it.

Signed-off-by: Figo.zhang <figo1802@gmail.com>
---  
drivers/media/video/usbvision/usbvision-core.c |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)



--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/media/video/usbvision/usbvision-core.c b/drivers/media/video/usbvision/usbvision-core.c
index 8bc03b9..1603b2b 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;
+	
 }
 
 /************************************************************