]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
net: sunhme: Inline error returns
authorSean Anderson <seanga2@gmail.com>
Fri, 24 Mar 2023 17:51:35 +0000 (13:51 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Mar 2023 07:41:56 +0000 (08:41 +0100)
The err_out label used to have cleanup. Now that it just returns, inline it
everywhere.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sun/sunhme.c

index b51b8930bef18761f33046033a8e59797c1fcfa4..bd1925f575c4bf7e0fa9cf3eca85a82c0b73509f 100644 (file)
@@ -2622,29 +2622,25 @@ static int happy_meal_pci_probe(struct pci_dev *pdev,
 
        err = pcim_enable_device(pdev);
        if (err)
-               goto err_out;
+               return err;
        pci_set_master(pdev);
 
        if (!strcmp(prom_name, "SUNW,qfe") || !strcmp(prom_name, "qfe")) {
                qp = quattro_pci_find(pdev);
-               if (IS_ERR(qp)) {
-                       err = PTR_ERR(qp);
-                       goto err_out;
-               }
+               if (IS_ERR(qp))
+                       return PTR_ERR(qp);
 
                for (qfe_slot = 0; qfe_slot < 4; qfe_slot++)
                        if (!qp->happy_meals[qfe_slot])
                                break;
 
                if (qfe_slot == 4)
-                       goto err_out;
+                       return -ENODEV;
        }
 
        dev = devm_alloc_etherdev(&pdev->dev, sizeof(struct happy_meal));
-       if (!dev) {
-               err = -ENOMEM;
-               goto err_out;
-       }
+       if (!dev)
+               return -ENOMEM;
        SET_NETDEV_DEV(dev, &pdev->dev);
 
        hp = netdev_priv(dev);
@@ -2792,8 +2788,6 @@ static int happy_meal_pci_probe(struct pci_dev *pdev,
 err_out_clear_quattro:
        if (qp != NULL)
                qp->happy_meals[qfe_slot] = NULL;
-
-err_out:
        return err;
 }