Skip to content

Commit

Permalink
USB: mos7840: remove unnecessary null test before kfree
Browse files Browse the repository at this point in the history
Cc: Johan Hovold <jhovold@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Johan Hovold <johan@kernel.org>
  • Loading branch information
Fabian Frederick authored and Johan Hovold committed Jul 7, 2014
1 parent 19de427 commit cca16d6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/usb/serial/mos7840.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}
}
Expand Down

0 comments on commit cca16d6

Please sign in to comment.