All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jingoo Han" <jingoohan1@gmail.com>
To: "'Fabio Estevam'" <fabio.estevam@nxp.com>, <bhelgaas@google.com>
Cc: <linux-pci@vger.kernel.org>
Subject: Re: [PATCH 01/10] PCI: exynos: Fix platform_get_irq() error handling
Date: Fri, 1 Sep 2017 09:17:48 -0400	[thread overview]
Message-ID: <000001d32324$b5466280$1fd32780$@gmail.com> (raw)
In-Reply-To: <1504201930-3617-1-git-send-email-fabio.estevam@nxp.com>

(CC'ed Joao Pinto)

On Thursday, August 31, 2017 1:52 PM, Fabio Estevam wrote:
> 
> platform_get_irq() returns a negative number on failure, so
> adjust the logic to detect such condition and propagate
> the real error value on failure.
> 
> Cc: Jingoo Han <jingoohan1@gmail.com>
> Reported-by: Bjorn Helgaas <helgaas@kernel.org>
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>

Acked-by: Jingoo Han <jingoohan1@gmail.com>

Best regards,
Jingoo Han

> ---
>  drivers/pci/dwc/pci-exynos.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/pci/dwc/pci-exynos.c b/drivers/pci/dwc/pci-exynos.c
> index f77f872..5596fde 100644
> --- a/drivers/pci/dwc/pci-exynos.c
> +++ b/drivers/pci/dwc/pci-exynos.c
> @@ -607,9 +607,9 @@ static int __init exynos_add_pcie_port(struct
> exynos_pcie *ep,
>  	int ret;
> 
>  	pp->irq = platform_get_irq(pdev, 1);
> -	if (!pp->irq) {
> +	if (pp->irq < 0) {
>  		dev_err(dev, "failed to get irq\n");
> -		return -ENODEV;
> +		return pp->irq;
>  	}
>  	ret = devm_request_irq(dev, pp->irq, exynos_pcie_irq_handler,
>  				IRQF_SHARED, "exynos-pcie", ep);
> @@ -620,9 +620,9 @@ static int __init exynos_add_pcie_port(struct
> exynos_pcie *ep,
> 
>  	if (IS_ENABLED(CONFIG_PCI_MSI)) {
>  		pp->msi_irq = platform_get_irq(pdev, 0);
> -		if (!pp->msi_irq) {
> +		if (pp->msi_irq < 0) {
>  			dev_err(dev, "failed to get msi irq\n");
> -			return -ENODEV;
> +			return pp->msi_irq;
>  		}
> 
>  		ret = devm_request_irq(dev, pp->msi_irq,
> --
> 2.7.4

  parent reply	other threads:[~2017-09-01 13:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-31 17:52 [PATCH 01/10] PCI: exynos: Fix platform_get_irq() error handling Fabio Estevam
2017-08-31 17:52 ` [PATCH 02/10] PCI: dra7xx: " Fabio Estevam
2017-09-01  6:43   ` Kishon Vijay Abraham I
2017-08-31 17:52 ` [PATCH 03/10] PCI: armada8k: " Fabio Estevam
2017-08-31 17:52 ` [PATCH 04/10] PCI: artpec6: " Fabio Estevam
2017-09-04 14:56   ` Niklas Cassel
2017-08-31 17:52 ` [PATCH 05/10] PCI: spear13xx: " Fabio Estevam
2017-08-31 17:52 ` [PATCH 06/10] PCI: xgene-msi: " Fabio Estevam
2017-08-31 17:52 ` [PATCH 07/10] PCI: altera-msi: " Fabio Estevam
2017-08-31 17:52 ` [PATCH 08/10] PCI: altera: " Fabio Estevam
2017-08-31 17:52 ` [PATCH 09/10] PCI: rockchip: " Fabio Estevam
2017-08-31 17:52 ` [PATCH 10/10] PCI: xilinx-nwl: " Fabio Estevam
2017-09-01 13:17 ` Jingoo Han [this message]
2017-09-05 18:46 ` [PATCH 01/10] PCI: exynos: " 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='000001d32324$b5466280$1fd32780$@gmail.com' \
    --to=jingoohan1@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=fabio.estevam@nxp.com \
    --cc=linux-pci@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.