projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dad3cab
)
usb: serial: Remove redundant NULL check before kfree
author
Syam Sidhardhan
<s.syam@samsung.com>
Wed, 6 Mar 2013 20:21:12 +0000
(
01:51
+0530)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Fri, 15 Mar 2013 18:45:16 +0000
(11:45 -0700)
kfree on NULL pointer is a no-op.
Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/mos7840.c
patch
|
blob
|
history
diff --git
a/drivers/usb/serial/mos7840.c
b/drivers/usb/serial/mos7840.c
index 809fb329eca5f945d13c25e75f74bf79145389df..107ff9e3ddad1930842ca4660beae956f249f88c 100644
(file)
--- a/
drivers/usb/serial/mos7840.c
+++ b/
drivers/usb/serial/mos7840.c
@@
-1252,8
+1252,7
@@
static void mos7840_close(struct usb_serial_port *port)
if (mos7840_port->write_urb) {
/* if this urb had a transfer buffer already (old tx) free it */
- if (mos7840_port->write_urb->transfer_buffer != NULL)
- kfree(mos7840_port->write_urb->transfer_buffer);
+ kfree(mos7840_port->write_urb->transfer_buffer);
usb_free_urb(mos7840_port->write_urb);
}