mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-22 04:03:58 +08:00
drivers/usb/serial/mos7840.c: remove unnecessary null test before kfree
Cc: Johan Hovold <jhovold@gmail.com> Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ddd9425741
commit
91c72df1fc
@ -1181,10 +1181,7 @@ static void mos7840_close(struct usb_serial_port *port)
|
|||||||
/* Freeing Write URBs */
|
/* Freeing Write URBs */
|
||||||
for (j = 0; j < NUM_URBS; ++j) {
|
for (j = 0; j < NUM_URBS; ++j) {
|
||||||
if (mos7840_port->write_urb_pool[j]) {
|
if (mos7840_port->write_urb_pool[j]) {
|
||||||
if (mos7840_port->write_urb_pool[j]->transfer_buffer)
|
kfree(mos7840_port->write_urb_pool[j]->transfer_buffer);
|
||||||
kfree(mos7840_port->write_urb_pool[j]->
|
|
||||||
transfer_buffer);
|
|
||||||
|
|
||||||
usb_free_urb(mos7840_port->write_urb_pool[j]);
|
usb_free_urb(mos7840_port->write_urb_pool[j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user