Re: [PATCH 1/1] drivers/usb/serial/mos7840.c: remove unnecessary null test before kfree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jun 28, 2014 at 02:44:09PM +0200, Fabian Frederick wrote:
> Cc: Johan Hovold <jhovold@xxxxxxxxx>
> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> Cc: linux-usb@xxxxxxxxxxxxxxx
> Signed-off-by: Fabian Frederick <fabf@xxxxxxxxx>

Applied, thanks.

Johan

> ---
>  drivers/usb/serial/mos7840.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
> index 393be56..3d88eef 100644
> --- a/drivers/usb/serial/mos7840.c
> +++ b/drivers/usb/serial/mos7840.c
> @@ -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]);
>  		}
>  	}
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux