summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/mos7840.c
diff options
context:
space:
mode:
authorSyam Sidhardhan <s.syam@samsung.com>2013-03-07 01:51:12 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-15 11:45:16 -0700
commitae8d4879667949fb49f0862b11ba680f671b2185 (patch)
tree0738c5d67e31137a8d5ff57601200f8d99effde3 /drivers/usb/serial/mos7840.c
parentdad3cab3e063110b3ae3dc82a00e7aacd09b91ec (diff)
downloadlinux-ae8d4879667949fb49f0862b11ba680f671b2185.tar.bz2
usb: serial: Remove redundant NULL check before kfree
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>
Diffstat (limited to 'drivers/usb/serial/mos7840.c')
-rw-r--r--drivers/usb/serial/mos7840.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
index 809fb329eca5..107ff9e3ddad 100644
--- 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);
}