Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 60bcabd0 authored by Oliver Neukum's avatar Oliver Neukum Committed by David S. Miller
Browse files

kaweth: fix firmware download



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: default avatarOliver Neukum <oneukum@suse.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b9f63ae7
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -1029,6 +1029,7 @@ static int kaweth_probe(
	kaweth = netdev_priv(netdev);
	kaweth = netdev_priv(netdev);
	kaweth->dev = udev;
	kaweth->dev = udev;
	kaweth->net = netdev;
	kaweth->net = netdev;
	kaweth->intf = intf;


	spin_lock_init(&kaweth->device_lock);
	spin_lock_init(&kaweth->device_lock);
	init_waitqueue_head(&kaweth->term_wait);
	init_waitqueue_head(&kaweth->term_wait);
@@ -1139,8 +1140,6 @@ static int kaweth_probe(


	dev_dbg(dev, "Initializing net device.\n");
	dev_dbg(dev, "Initializing net device.\n");


	kaweth->intf = intf;

	kaweth->tx_urb = usb_alloc_urb(0, GFP_KERNEL);
	kaweth->tx_urb = usb_alloc_urb(0, GFP_KERNEL);
	if (!kaweth->tx_urb)
	if (!kaweth->tx_urb)
		goto err_free_netdev;
		goto err_free_netdev;