summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2011-03-13 00:29:12 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-03-14 11:57:37 -0700
commit06dde506203147e8d245a505d491c40254561f17 (patch)
tree71a6d480437a96a9e60b5271daa70d7a331b0a38 /drivers/staging
parent9f7ff701ad7b7bdcab949aa0527fe7efb3882afa (diff)
downloadlinux-stable-06dde506203147e8d245a505d491c40254561f17.tar.gz
linux-stable-06dde506203147e8d245a505d491c40254561f17.tar.bz2
linux-stable-06dde506203147e8d245a505d491c40254561f17.zip
staging: usbip: Remove NULL check before kfree
This patch was generated by the following semantic patch: // <smpl> @@ expression E; @@ - if (E != NULL) { kfree(E); } + kfree(E); @@ expression E; @@ - if (E != NULL) { kfree(E); E = NULL; } + kfree(E); + E = NULL; // </smpl> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/usbip/stub_main.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/usbip/stub_main.c b/drivers/staging/usbip/stub_main.c
index f3a40968aae2..076a7e531098 100644
--- a/drivers/staging/usbip/stub_main.c
+++ b/drivers/staging/usbip/stub_main.c
@@ -264,11 +264,9 @@ void stub_device_cleanup_urbs(struct stub_device *sdev)
kmem_cache_free(stub_priv_cache, priv);
- if (urb->transfer_buffer != NULL)
- kfree(urb->transfer_buffer);
+ kfree(urb->transfer_buffer);
- if (urb->setup_packet != NULL)
- kfree(urb->setup_packet);
+ kfree(urb->setup_packet);
usb_free_urb(urb);
}