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

Commit 4cf964af authored by Heiner Kallweit's avatar Heiner Kallweit Committed by David S. Miller
Browse files

r8169: remove netif_napi_del in probe error path



netif_napi_del is called implicitely by free_netdev, therefore we
don't have to do it explicitely.

When the probe error path is reached, the net_device isn't
registered yet. Therefore reordering the call to netif_napi_del
shouldn't cause any issues.

Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4c45d24a
Loading
Loading
Loading
Loading
+3 −10
Original line number Original line Diff line number Diff line
@@ -8672,14 +8672,12 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
	tp->counters = dmam_alloc_coherent (&pdev->dev, sizeof(*tp->counters),
	tp->counters = dmam_alloc_coherent (&pdev->dev, sizeof(*tp->counters),
					    &tp->counters_phys_addr,
					    &tp->counters_phys_addr,
					    GFP_KERNEL);
					    GFP_KERNEL);
	if (!tp->counters) {
	if (!tp->counters)
		rc = -ENOMEM;
		return -ENOMEM;
		goto err_out_msi_5;
	}


	rc = register_netdev(dev);
	rc = register_netdev(dev);
	if (rc < 0)
	if (rc < 0)
		goto err_out_msi_5;
		return rc;


	pci_set_drvdata(pdev, dev);
	pci_set_drvdata(pdev, dev);


@@ -8709,11 +8707,6 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
	netif_carrier_off(dev);
	netif_carrier_off(dev);


	return 0;
	return 0;

err_out_msi_5:
	netif_napi_del(&tp->napi);

	return rc;
}
}


static struct pci_driver rtl8169_pci_driver = {
static struct pci_driver rtl8169_pci_driver = {