[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALs4sv3s3fVNK-GPZbb6kuOqEWWvJpz=S0Wzc4Dm2p3Gz+SR9w@mail.gmail.com>
Date: Thu, 23 Feb 2023 13:35:24 +0530
From: Pavan Chebbi <pavan.chebbi@...adcom.com>
To: Sean Anderson <seanga2@...il.com>
Cc: "David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, Dan Carpenter <error27@...il.com>,
Rolf Eike Beer <eike-kernel@...tec.de>
Subject: Re: [PATCH net] net: sunhme: Fix region request
On Thu, Feb 23, 2023 at 2:12 AM Sean Anderson <seanga2@...il.com> wrote:
>
> 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@...il.com>
> ---
>
Looks OK to me.
Reviewed-by: Pavan Chebbi <pavan.chebbi@...adcom.com>
> drivers/net/ethernet/sun/sunhme.c | 6 ++++--
> 1 file 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");
> --
> 2.37.1
>
Download attachment "smime.p7s" of type "application/pkcs7-signature" (4209 bytes)
Powered by blists - more mailing lists