All of lore.kernel.org
 help / color / mirror / Atom feed
From: Valentine <valentine.barshak@cogentembedded.com>
To: Ben Dooks <ben.dooks@codethink.co.uk>,
	linux-kernel@lists.codethink.co.uk
Cc: linux-sh@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>,
	Simon Horman <horms@verge.net.au>,
	linux-pci@vger.kernel.org
Subject: Re: [PATCH 1/3] PCI: rcar: check platform_get_irq() return code
Date: Wed, 29 Jan 2014 00:19:16 +0400	[thread overview]
Message-ID: <52E810C4.102@cogentembedded.com> (raw)
In-Reply-To: <1390903616-8073-2-git-send-email-ben.dooks@codethink.co.uk>

On 01/28/2014 02:06 PM, Ben Dooks wrote:
> The current code does not check the return from platform_get_irq()
> so add an error check and return if this call does fail.
>

If you have really experienced this error your platform data is incorrect.

> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>

Acked-by: Valentine Barshak <valentine.barshak@cogentembedded.com>

> ---
> Cc: Valentine Barshak <valentine.barshak@cogentembedded.com>
> Cc: Simon Horman <horms@verge.net.au>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: linux-pci@vger.kernel.org
> Cc: linux-sh@vger.kernel.org
> ---
>   drivers/pci/host/pci-rcar-gen2.c | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/drivers/pci/host/pci-rcar-gen2.c b/drivers/pci/host/pci-rcar-gen2.c
> index ea65bac..674f7fe 100644
> --- a/drivers/pci/host/pci-rcar-gen2.c
> +++ b/drivers/pci/host/pci-rcar-gen2.c
> @@ -308,6 +308,11 @@ static int __init rcar_pci_probe(struct platform_device *pdev)
>   	priv->reg = reg;
>   	priv->dev = &pdev->dev;
>
> +	if (priv->irq < 0) {
> +		dev_err(&pdev->dev, "no valid irq found\n");
> +		return priv->irq;
> +	}
> +
>   	return rcar_pci_add_controller(priv);
>   }
>
>


WARNING: multiple messages have this Message-ID (diff)
From: Valentine <valentine.barshak@cogentembedded.com>
To: Ben Dooks <ben.dooks@codethink.co.uk>,
	linux-kernel@lists.codethink.co.uk
Cc: linux-sh@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>,
	Simon Horman <horms@verge.net.au>,
	linux-pci@vger.kernel.org
Subject: Re: [PATCH 1/3] PCI: rcar: check platform_get_irq() return code
Date: Tue, 28 Jan 2014 20:19:16 +0000	[thread overview]
Message-ID: <52E810C4.102@cogentembedded.com> (raw)
In-Reply-To: <1390903616-8073-2-git-send-email-ben.dooks@codethink.co.uk>

On 01/28/2014 02:06 PM, Ben Dooks wrote:
> The current code does not check the return from platform_get_irq()
> so add an error check and return if this call does fail.
>

If you have really experienced this error your platform data is incorrect.

> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>

Acked-by: Valentine Barshak <valentine.barshak@cogentembedded.com>

> ---
> Cc: Valentine Barshak <valentine.barshak@cogentembedded.com>
> Cc: Simon Horman <horms@verge.net.au>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: linux-pci@vger.kernel.org
> Cc: linux-sh@vger.kernel.org
> ---
>   drivers/pci/host/pci-rcar-gen2.c | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/drivers/pci/host/pci-rcar-gen2.c b/drivers/pci/host/pci-rcar-gen2.c
> index ea65bac..674f7fe 100644
> --- a/drivers/pci/host/pci-rcar-gen2.c
> +++ b/drivers/pci/host/pci-rcar-gen2.c
> @@ -308,6 +308,11 @@ static int __init rcar_pci_probe(struct platform_device *pdev)
>   	priv->reg = reg;
>   	priv->dev = &pdev->dev;
>
> +	if (priv->irq < 0) {
> +		dev_err(&pdev->dev, "no valid irq found\n");
> +		return priv->irq;
> +	}
> +
>   	return rcar_pci_add_controller(priv);
>   }
>
>


  reply	other threads:[~2014-01-28 20:19 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-28 10:06 PCI fixes for Renesas RCar Ben Dooks
2014-01-28 10:06 ` [PATCH 1/3] PCI: rcar: check platform_get_irq() return code Ben Dooks
2014-01-28 20:19   ` Valentine [this message]
2014-01-28 20:19     ` Valentine
2014-01-28 10:06 ` [PATCH 2/3] PCI: rcar: add error interrupt handling Ben Dooks
2014-01-28 20:47   ` Valentine
2014-01-28 20:47     ` Valentine
2014-01-28 10:06 ` [PATCH 3/3] PCI: rcar: fix bridge logic configuration accesses Ben Dooks
2014-01-28 10:06   ` Ben Dooks
2014-01-28 19:41   ` Valentine
2014-01-28 19:41     ` Valentine
2014-01-29  6:42     ` Simon Horman
2014-01-29  6:42       ` Simon Horman
2014-01-29  9:13       ` Valentine
2014-01-29  9:13         ` Valentine
2014-01-29  9:13     ` Ben Dooks
2014-01-29  9:17       ` Valentine
2014-01-29  9:17         ` Valentine
     [not found] <1390902468-7753-1-git-send-email-ben.dooks@codethink.co.uk>
2014-01-28  9:47 ` [PATCH 1/3] PCI: rcar: check platform_get_irq() return code Ben Dooks
2014-01-28 15:11   ` Sergei Shtylyov
2014-01-28 16:11     ` Sergei Shtylyov
2014-01-28 15:34     ` Ben Dooks

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=52E810C4.102@cogentembedded.com \
    --to=valentine.barshak@cogentembedded.com \
    --cc=ben.dooks@codethink.co.uk \
    --cc=bhelgaas@google.com \
    --cc=horms@verge.net.au \
    --cc=linux-kernel@lists.codethink.co.uk \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    /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.