mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-27 06:34:11 +08:00
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>
This commit is contained in:
parent
dad3cab3e0
commit
ae8d487966
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user