From: "Uwe Kleine-König" <Uwe.Kleine-Koenig@digi.com>
To: Roel Kluin <12o3l@tiscali.nl>
Cc: <rmk@arm.linux.org.uk>,
Linux-arm <linux-arm-kernel@lists.arm.linux.org.uk>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ARM: am79c961a: platform_get_irq() may return signed unnoticed
Date: Thu, 24 Apr 2008 08:11:10 +0200 [thread overview]
Message-ID: <20080424061110.GC17978@digi.com> (raw)
In-Reply-To: <480FADA3.7030708@tiscali.nl>
Hello,
Roel Kluin wrote:
> dev->irq is unsigned, platform_get_irq() may return signed unnoticed
>
> Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
> ---
> diff --git a/drivers/net/arm/am79c961a.c b/drivers/net/arm/am79c961a.c
> index ba6bd03..a637910 100644
> --- a/drivers/net/arm/am79c961a.c
> +++ b/drivers/net/arm/am79c961a.c
> @@ -693,11 +693,15 @@ static int __init am79c961_probe(struct platform_device *pdev)
> * done by the ether bootp loader.
> */
> dev->base_addr = res->start;
> - dev->irq = platform_get_irq(pdev, 0);
> + ret = platform_get_irq(pdev, 0);
>
> - ret = -ENODEV;
> - if (dev->irq < 0)
> + if (ret < 0) {
> + ret = -ENODEV;
> goto nodev;
> + }
> + dev->irq = ret;
> +
> + ret = -ENODEV;
> if (!request_region(dev->base_addr, 0x18, dev->name))
> goto nodev;
For me the change looks fine.
Best regards
Uwe
--
Uwe Kleine-König, Software Engineer
Digi International GmbH Branch Breisach, Küferstrasse 8, 79206 Breisach, Germany
Tax: 315/5781/0242 / VAT: DE153662976 / Reg. Amtsgericht Dortmund HRB 13962
next prev parent reply other threads:[~2008-04-24 6:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-23 21:44 [PATCH] ARM: am79c961a: platform_get_irq() may return signed unnoticed Roel Kluin
2008-04-23 21:49 ` [PATCH 2/2] ARM: ax88796: " Roel Kluin
2008-04-28 20:09 ` Russell King - ARM Linux
2008-04-24 6:11 ` Uwe Kleine-König [this message]
2008-04-29 5:59 ` [PATCH] ARM: am79c961a: " 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=20080424061110.GC17978@digi.com \
--to=uwe.kleine-koenig@digi.com \
--cc=12o3l@tiscali.nl \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk@arm.linux.org.uk \
/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