All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bhelgaas@google.com>
To: Wei Yongjun <weiyj.lk@gmail.com>
Cc: valentine.barshak@cogentembedded.com,
	yongjun_wei@trendmicro.com.cn, linux-pci@vger.kernel.org
Subject: Re: [PATCH] PCI: rcar: fix return value check in rcar_pci_probe()
Date: Sat, 7 Dec 2013 15:50:12 -0700	[thread overview]
Message-ID: <20131207225012.GC7901@google.com> (raw)
In-Reply-To: <CAPgLHd-XTnQXdK7H2uLbGW1ftxNB_nHwzcNCoiCjpXsB5X3HnA@mail.gmail.com>

On Tue, Nov 19, 2013 at 11:40:28AM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> In case of error, the function devm_ioremap_resource() returns ERR_PTR()
> and never returns NULL. The NULL test in the return value check should
> be replaced with IS_ERR().
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Applied with Jingoo's reviewed-by to pci/host-rcar for v3.14, thanks!

For drivers/pci/host/*, I normally look for an ack from the responsible
person,  but this patch is trivial enough that I'm fine taking it without
that.  But for more significant changes, I don't have any notes about who
should own pci-rcar-gen2.c.  Valentine could be a candidate since he added
it in the first place?  Or Jingoo?

Bjorn

> ---
>  drivers/pci/host/pci-rcar-gen2.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pci/host/pci-rcar-gen2.c b/drivers/pci/host/pci-rcar-gen2.c
> index cbaa5c4..96d1182 100644
> --- a/drivers/pci/host/pci-rcar-gen2.c
> +++ b/drivers/pci/host/pci-rcar-gen2.c
> @@ -276,8 +276,8 @@ static int __init rcar_pci_probe(struct platform_device *pdev)
>  
>  	cfg_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	reg = devm_ioremap_resource(&pdev->dev, cfg_res);
> -	if (!reg)
> -		return -ENODEV;
> +	if (IS_ERR(reg))
> +		return PTR_ERR(reg);
>  
>  	mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
>  	if (!mem_res || !mem_res->start)
> 

  parent reply	other threads:[~2013-12-07 22:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-19  3:40 [PATCH] PCI: rcar: fix return value check in rcar_pci_probe() Wei Yongjun
2013-11-19  7:05 ` Jingoo Han
2013-12-07 22:50 ` Bjorn Helgaas [this message]
2013-12-09  1:46   ` Jingoo Han
2013-12-09  1:46     ` Jingoo Han
2013-12-11  2:30     ` Simon Horman
2013-12-11  2:30       ` Simon Horman
2013-12-13 12:06       ` Valentine
2013-12-13 12:06         ` Valentine
2013-12-13 17:00         ` Bjorn Helgaas
2013-12-13 17:00           ` Bjorn Helgaas

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=20131207225012.GC7901@google.com \
    --to=bhelgaas@google.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=valentine.barshak@cogentembedded.com \
    --cc=weiyj.lk@gmail.com \
    --cc=yongjun_wei@trendmicro.com.cn \
    /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.