diff options
author | Sean Anderson <seanga2@gmail.com> | 2023-02-22 15:42:41 -0500 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-02-23 09:58:51 -0800 |
commit | ee0a735fd97ccde766ab557d1fc722c92cebacda (patch) | |
tree | 1f326fbdc5b56777f060a064917c17b27452998b | |
parent | edea0c5a994b7829c9ada8f5bc762c4e32f4f797 (diff) | |
download | linux-stable-ee0a735fd97ccde766ab557d1fc722c92cebacda.tar.gz linux-stable-ee0a735fd97ccde766ab557d1fc722c92cebacda.tar.bz2 linux-stable-ee0a735fd97ccde766ab557d1fc722c92cebacda.zip |
net: sunhme: Fix region request
devm_request_region is for I/O regions. Use devm_request_mem_region
instead. This fixes the driver failing to probe since 99df45c9e0a4
("sunhme: fix an IS_ERR() vs NULL check in probe"), which checked the
result.
Fixes: 914d9b2711dd ("sunhme: switch to devres")
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Link: https://lore.kernel.org/r/20230222204242.2658247-1-seanga2@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r-- | drivers/net/ethernet/sun/sunhme.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/sun/sunhme.c b/drivers/net/ethernet/sun/sunhme.c index 1c16548415cd..b0c7ab74a82e 100644 --- a/drivers/net/ethernet/sun/sunhme.c +++ b/drivers/net/ethernet/sun/sunhme.c @@ -2894,8 +2894,10 @@ static int happy_meal_pci_probe(struct pci_dev *pdev, goto err_out_clear_quattro; } - hpreg_res = devm_request_region(&pdev->dev, pci_resource_start(pdev, 0), - pci_resource_len(pdev, 0), DRV_NAME); + hpreg_res = devm_request_mem_region(&pdev->dev, + pci_resource_start(pdev, 0), + pci_resource_len(pdev, 0), + DRV_NAME); if (!hpreg_res) { err = -EBUSY; dev_err(&pdev->dev, "Cannot obtain PCI resources, aborting.\n"); |