summaryrefslogtreecommitdiff
path: root/drivers/net/fddi
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2014-11-21 14:09:52 +0000
committerDavid S. Miller <davem@davemloft.net>2014-11-21 16:37:13 -0500
commita65da0c3dac6e2d4f8ecf0aee8b0abe10001f2d9 (patch)
tree513dfdcd90b7cff6c2bb4d4a673490210d795e26 /drivers/net/fddi
parent37dd9255b2f6201195946014600a8d857f846cf4 (diff)
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: Maciej W. Rozycki <macro@linux-mips.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/fddi')
-rw-r--r--drivers/net/fddi/defxx.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/fddi/defxx.c b/drivers/net/fddi/defxx.c
index caed6eee289c..d8d4f3d3ca32 100644
--- a/drivers/net/fddi/defxx.c
+++ b/drivers/net/fddi/defxx.c
@@ -542,10 +542,13 @@ static int dfx_register(struct device *bdev)
}
/* Enable PCI device. */
- if (dfx_bus_pci && pci_enable_device(to_pci_dev(bdev))) {
- printk(KERN_ERR "%s: Cannot enable PCI device, aborting\n",
- print_name);
- goto err_out;
+ if (dfx_bus_pci) {
+ err = pci_enable_device(to_pci_dev(bdev));
+ if (err) {
+ pr_err("%s: Cannot enable PCI device, aborting\n",
+ print_name);
+ goto err_out;
+ }
}
SET_NETDEV_DEV(dev, bdev);