drivers/usb/serial/mos7840.c: remove unnecessary null test before kfree
authorFabian Frederick <fabf@skynet.be>
Sat, 28 Jun 2014 12:44:09 +0000 (14:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jul 2014 23:25:22 +0000 (16:25 -0700)
Cc: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/mos7840.c

index 393be562d875da89b573f124712c5959ea663247..3d88eefdf1d14d5b5744b61a3676aec24c9ab2e1 100644 (file)
@@ -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]);
                }
        }