Commit ae8d4879 authored by Syam Sidhardhan's avatar Syam Sidhardhan Committed by Greg Kroah-Hartman
Browse files

usb: serial: Remove redundant NULL check before kfree



kfree on NULL pointer is a no-op.

Signed-off-by: default avatarSyam Sidhardhan <s.syam@samsung.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dad3cab3
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1252,7 +1252,6 @@ 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);
		usb_free_urb(mos7840_port->write_urb);
	}