drivers/usb/serial/mos7840.c: remove unnecessary null test before kfree
Subsystems (2)
PATCH 1/1 drivers/usb/serial/mos7840.c: remove unnecessary null test before kfree
Cc Johan Hovold <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Signed-off-by Fabian Frederick <[email protected]>
--- drivers/usb/serial/mos7840.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/usb/serial/mos7840.c +1 -4
@@ -1181,10 +1181,7 @@ static void mos7840_close(struct usb_serial_port *port)/* Freeing Write URBs */ for (j =0 ; j <NUM_URBS ; ++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]); } }
Signature · 1 line
1.8.4.5
Quoted 4 lines · Fabian Frederick
Cc Johan Hovold <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Fabian Frederick <[email protected]>
Applied, thanks.
Johan
Quoted 20 lines
--- drivers/usb/serial/mos7840.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)drivers/usb/serial/mos7840.c +1
-4@@ -1181,10 +1181,7 @@ static void mos7840_close(struct usb_serial_port *port)/* Freeing Write URBs */ for (j =0 ; j <NUM_URBS ; ++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]); } }