]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
kaweth: fix firmware download
authorOliver Neukum <oneukum@suse.com>
Wed, 17 Aug 2016 13:51:55 +0000 (15:51 +0200)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Tue, 22 Aug 2017 09:58:02 +0000 (06:58 -0300)
BugLink: http://bugs.launchpad.net/bugs/1710646
commit 60bcabd080f53561efa9288be45c128feda1a8bb upstream.

This fixes the oops discovered by the Umap2 project and Alan Stern.
The intf member needs to be set before the firmware is downloaded.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
drivers/net/usb/kaweth.c

index f64b25c221e83b63704db0d856132ca96b7e606c..9f900eee27be1797554a366539d493309454db26 100644 (file)
@@ -1029,6 +1029,7 @@ static int kaweth_probe(
        kaweth = netdev_priv(netdev);
        kaweth->dev = udev;
        kaweth->net = netdev;
+       kaweth->intf = intf;
 
        spin_lock_init(&kaweth->device_lock);
        init_waitqueue_head(&kaweth->term_wait);
@@ -1139,8 +1140,6 @@ err_fw:
 
        dev_dbg(dev, "Initializing net device.\n");
 
-       kaweth->intf = intf;
-
        kaweth->tx_urb = usb_alloc_urb(0, GFP_KERNEL);
        if (!kaweth->tx_urb)
                goto err_free_netdev;