mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-15 05:11:32 +00:00
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>
This commit is contained in:
parent
37dd9255b2
commit
a65da0c3da
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user