summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/atheros
diff options
context:
space:
mode:
authorCai Huoqing <caihuoqing@baidu.com>2021-09-15 16:57:56 +0200
committerDavid S. Miller <davem@davemloft.net>2021-09-16 14:35:35 +0200
commitb0ab7096dd9bf4d6d5c9d889ab216eb78f7e0b04 (patch)
tree2f5573bff7d63c09359a619ba18e9f43516e5d73 /drivers/net/ethernet/atheros
parentnet: atl1c: Make use of the helper function dev_err_probe() (diff)
downloadlinux-b0ab7096dd9bf4d6d5c9d889ab216eb78f7e0b04.tar.xz
linux-b0ab7096dd9bf4d6d5c9d889ab216eb78f7e0b04.zip
net: atl1e: Make use of the helper function dev_err_probe()
When possible use dev_err_probe help to properly deal with the PROBE_DEFER error, the benefit is that DEFER issue will be logged in the devices_deferred debugfs file. And using dev_err_probe() can reduce code size, and simplify the code. Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/atheros')
-rw-r--r--drivers/net/ethernet/atheros/atl1e/atl1e_main.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
index 753973ac922e..2e22483a9040 100644
--- a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
+++ b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
@@ -2297,10 +2297,8 @@ static int atl1e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
int err = 0;
err = pci_enable_device(pdev);
- if (err) {
- dev_err(&pdev->dev, "cannot enable PCI device\n");
- return err;
- }
+ if (err)
+ return dev_err_probe(&pdev->dev, err, "cannot enable PCI device\n");
/*
* The atl1e chip can DMA to 64-bit addresses, but it uses a single