All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manivannan Sadhasivam <mani@kernel.org>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: "Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	"Kishon Vijay Abraham I" <kishon@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Damien Le Moal" <dlemoal@kernel.org>,
	mhi@lists.linux.dev, linux-arm-msm@vger.kernel.org,
	linux-pci@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 2/2] PCI: endpoint: Fix an IS_ERR() vs NULL bug
Date: Fri, 9 Jun 2023 21:24:44 +0530	[thread overview]
Message-ID: <20230609155444.GE6847@thinkpad> (raw)
In-Reply-To: <ca14e566-d9b7-471d-b738-56dd697b1417@moroto.mountain>

On Fri, Jun 09, 2023 at 01:50:09PM +0300, Dan Carpenter wrote:
> The ioremap() function does not return error pointers, it returns NULL
> on error.
> 
> Fixes: 7db424a84d96 ("PCI: endpoint: Add PCI Endpoint function driver for MHI bus")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>

Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>

- Mani

> ---
>  drivers/pci/endpoint/functions/pci-epf-mhi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pci/endpoint/functions/pci-epf-mhi.c b/drivers/pci/endpoint/functions/pci-epf-mhi.c
> index e7d64b9d12ff..b45db923306b 100644
> --- a/drivers/pci/endpoint/functions/pci-epf-mhi.c
> +++ b/drivers/pci/endpoint/functions/pci-epf-mhi.c
> @@ -354,8 +354,8 @@ static int pci_epf_mhi_bind(struct pci_epf *epf)
>  	epf_mhi->mmio_size = resource_size(res);
>  
>  	epf_mhi->mmio = ioremap(epf_mhi->mmio_phys, epf_mhi->mmio_size);
> -	if (IS_ERR(epf_mhi->mmio))
> -		return PTR_ERR(epf_mhi->mmio);
> +	if (!epf_mhi->mmio)
> +		return -ENOMEM;
>  
>  	ret = platform_get_irq_byname(pdev, "doorbell");
>  	if (ret < 0) {
> -- 
> 2.39.2
> 

-- 
மணிவண்ணன் சதாசிவம்

  reply	other threads:[~2023-06-09 15:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-09 10:49 [PATCH 1/2] PCI: endpoint: Check correct variable in __pci_epf_mhi_alloc_map() Dan Carpenter
2023-06-09 10:50 ` [PATCH 2/2] PCI: endpoint: Fix an IS_ERR() vs NULL bug Dan Carpenter
2023-06-09 15:54   ` Manivannan Sadhasivam [this message]
2023-06-09 15:50 ` [PATCH 1/2] PCI: endpoint: Check correct variable in __pci_epf_mhi_alloc_map() Manivannan Sadhasivam
2023-06-14 10:42 ` Lorenzo Pieralisi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230609155444.GE6847@thinkpad \
    --to=mani@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=dan.carpenter@linaro.org \
    --cc=dlemoal@kernel.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kishon@kernel.org \
    --cc=kw@linux.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=mhi@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.