Skip to content

Commit cca16d6

Browse files
Fabian Frederickjhovold
authored andcommitted
USB: mos7840: remove unnecessary null test before kfree
Cc: Johan Hovold <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: [email protected] Signed-off-by: Fabian Frederick <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
1 parent 19de427 commit cca16d6

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/usb/serial/mos7840.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,10 +1181,7 @@ static void mos7840_close(struct usb_serial_port *port)
11811181
/* Freeing Write URBs */
11821182
for (j = 0; j < NUM_URBS; ++j) {
11831183
if (mos7840_port->write_urb_pool[j]) {
1184-
if (mos7840_port->write_urb_pool[j]->transfer_buffer)
1185-
kfree(mos7840_port->write_urb_pool[j]->
1186-
transfer_buffer);
1187-
1184+
kfree(mos7840_port->write_urb_pool[j]->transfer_buffer);
11881185
usb_free_urb(mos7840_port->write_urb_pool[j]);
11891186
}
11901187
}

0 commit comments

Comments
 (0)