summaryrefslogtreecommitdiff
path: root/drivers/staging/serqt_usb2
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2011-03-13 00:29:09 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-03-14 11:57:35 -0700
commitef055f10000c5013d269cac9fc92c200bf314e40 (patch)
treee8d97f7f229d9aa624fd2a6120f1151a5ed5632e /drivers/staging/serqt_usb2
parentb7977fa250c1732d1fc1b5832f257655fd7471a4 (diff)
staging: serqt_usb2: 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/serqt_usb2')
-rw-r--r--drivers/staging/serqt_usb2/serqt_usb2.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/serqt_usb2/serqt_usb2.c b/drivers/staging/serqt_usb2/serqt_usb2.c
index 27841ef6a568..2be2d889d443 100644
--- a/drivers/staging/serqt_usb2/serqt_usb2.c
+++ b/drivers/staging/serqt_usb2/serqt_usb2.c
@@ -1098,8 +1098,7 @@ static void qt_close(struct usb_serial_port *port)
if (qt_port->write_urb) {
/* if this urb had a transfer buffer already (old tx) free it */
- if (qt_port->write_urb->transfer_buffer != NULL)
- kfree(qt_port->write_urb->transfer_buffer);
+ kfree(qt_port->write_urb->transfer_buffer);
usb_free_urb(qt_port->write_urb);
}