diff options
author | Douglas Schilling Landgraf <dougsland@redhat.com> | 2009-06-11 10:33:31 -0300 |
---|---|---|
committer | Douglas Schilling Landgraf <dougsland@redhat.com> | 2009-06-11 10:33:31 -0300 |
commit | ec19d917aadc39178db95a5f7cc012f1cc8b6718 (patch) | |
tree | a78de8d993a47e26cd8f694214b37b573eb111a3 /linux/drivers/media/video/usbvision/usbvision-core.c | |
parent | 2c27de496b19238e991e8e4cf930d2b9998fd71b (diff) | |
download | mediapointer-dvb-s2-ec19d917aadc39178db95a5f7cc012f1cc8b6718.tar.gz mediapointer-dvb-s2-ec19d917aadc39178db95a5f7cc012f1cc8b6718.tar.bz2 |
usbvision-core.c: vfree does its own NULL check
From: Figo.zhang <figo1802@gmail.com>
vfree() does it's own NULL checking,so no need for check before
calling it.
Priority: normal
Signed-off-by: Figo.zhang <figo1802@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/usbvision/usbvision-core.c')
-rw-r--r-- | linux/drivers/media/video/usbvision/usbvision-core.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/linux/drivers/media/video/usbvision/usbvision-core.c b/linux/drivers/media/video/usbvision/usbvision-core.c index 9253ec6dd..baf2e5621 100644 --- a/linux/drivers/media/video/usbvision/usbvision-core.c +++ b/linux/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; + } /************************************************************ |