[PATCH 19/24] staging: usbip: Remove NULL check before kfree

From: Ilia Mirkin
Date: Sun Mar 13 2011 - 00:33:37 EST


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@xxxxxxxxxxxx>
---
drivers/staging/usbip/stub_main.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/usbip/stub_main.c b/drivers/staging/usbip/stub_main.c
index f3a4096..076a7e5 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);
}
--
1.7.3.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/