RE: [PATCH 1/1] net: usb: set error code when usb_alloc_urb fails

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

 



> Signed-off-by: Pan Bian <bianpan2016@xxxxxxx>
> ---
>  drivers/net/usb/lan78xx.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
> index db558b8..f33460c 100644
> --- a/drivers/net/usb/lan78xx.c
> +++ b/drivers/net/usb/lan78xx.c
> @@ -3395,6 +3395,7 @@ static int lan78xx_probe(struct usb_interface *intf,
>  	if (buf) {
>  		dev->urb_intr = usb_alloc_urb(0, GFP_KERNEL);
>  		if (!dev->urb_intr) {
> +			ret = -ENOMEM;
>  			kfree(buf);
>  			goto out3;
>  		} else {
> --
> 1.9.1
> 
Acked-by: Woojung Huh <woojung.huh@xxxxxxxxxxxxx>
--
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