alx: fix a double unlock in alx_probe()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 17 May 2021 08:57:56 +0000 (11:57 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 17 May 2021 22:47:54 +0000 (15:47 -0700)
We're not holding the lock at this point so "goto unlock;" should be
"goto unmap;"

Fixes: 4a5fe57e7751 ("alx: use fine-grained locking instead of RTNL")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/atheros/alx/main.c

index e888487..45e380f 100644 (file)
@@ -1859,7 +1859,7 @@ static int alx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        err = register_netdev(netdev);
        if (err) {
                dev_err(&pdev->dev, "register netdevice failed\n");
-               goto out_unlock;
+               goto out_unmap;
        }
 
        netdev_info(netdev,