Commit a65da0c3 authored by Maciej W. Rozycki's avatar Maciej W. Rozycki Committed by David S. Miller

defxx: Fix DEFPA enable error propagation

Correctly propagate the error code from `pci_enable_device' if non zero.
Currently a failure of this function is correctly recognized and device
initialization abandoned, however a successful completion code returned.
Signed-off-by: default avatarMaciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 37dd9255
...@@ -542,10 +542,13 @@ static int dfx_register(struct device *bdev) ...@@ -542,10 +542,13 @@ static int dfx_register(struct device *bdev)
} }
/* Enable PCI device. */ /* Enable PCI device. */
if (dfx_bus_pci && pci_enable_device(to_pci_dev(bdev))) { if (dfx_bus_pci) {
printk(KERN_ERR "%s: Cannot enable PCI device, aborting\n", err = pci_enable_device(to_pci_dev(bdev));
print_name); if (err) {
goto err_out; pr_err("%s: Cannot enable PCI device, aborting\n",
print_name);
goto err_out;
}
} }
SET_NETDEV_DEV(dev, bdev); SET_NETDEV_DEV(dev, bdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment