linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: Roel Kluin <roel.kluin@gmail.com>
Cc: jgarzik@redhat.com, linux-ide@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Phil Sutter <n0-1@freewrt.org>,
	Florian Fainelli <florian@openwrt.org>
Subject: Re: [PATCH] pata-rb532-cf: platform_get_irq() failure ignored
Date: Thu, 05 Mar 2009 07:23:22 -0500	[thread overview]
Message-ID: <49AFC43A.3040206@garzik.org> (raw)
In-Reply-To: <49AD2ADA.5030109@gmail.com>

Roel Kluin wrote:
> ------------------------------>8-------------8<---------------------------------
> platform_get_irq() can return -ENXIO, but since 'irq' is an unsigned int, it
> does not show when the IRQ resource wasn't found.
> 
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
> diff --git a/drivers/ata/pata_rb532_cf.c b/drivers/ata/pata_rb532_cf.c
> index ebfcda2..fe8178c 100644
> --- a/drivers/ata/pata_rb532_cf.c
> +++ b/drivers/ata/pata_rb532_cf.c
> @@ -173,11 +173,12 @@ static __devinit int rb532_pata_driver_probe(struct platform_device *pdev)
>  		return -EINVAL;
>  	}
>  
> -	irq = platform_get_irq(pdev, 0);
> -	if (irq <= 0) {
> +	ret = platform_get_irq(pdev, 0);
> +	if (ret <= 0) {
>  		dev_err(&pdev->dev, "no IRQ resource found\n");
>  		return -ENOENT;
>  	}
> +	irq = ret;
>  
>  	gpio = irq_to_gpio(irq);

ACK from Phil or Florian?


  reply	other threads:[~2009-03-05 12:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-03 13:04 [PATCH] pata-rb532-cf: platform_get_irq() failure ignored Roel Kluin
2009-03-05 12:23 ` Jeff Garzik [this message]
2009-03-06 16:43   ` Phil Sutter
2009-03-13 14:41     ` Florian Fainelli
2009-03-14  0:51       ` Phil Sutter
2009-03-25  2:16       ` Jeff Garzik

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=49AFC43A.3040206@garzik.org \
    --to=jeff@garzik.org \
    --cc=akpm@linux-foundation.org \
    --cc=florian@openwrt.org \
    --cc=jgarzik@redhat.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=n0-1@freewrt.org \
    --cc=roel.kluin@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).