public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Jan Weitzel <j.weitzel@phytec.de>
Cc: Alexey Dobriyan <adobriyan@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Paul Gortmaker <paul.gortmaker@windriver.com>,
	Thomas Meyer <thomas@m3y3r.de>,
	Danny Kukawka <danny.kukawka@bisect.de>,
	netdev@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] net/ethernet: ks8851_mll: signedness bug in ks8851_probe()
Date: Fri, 17 Feb 2012 06:44:33 +0000	[thread overview]
Message-ID: <20120217064433.GC3666@elgon.mountain> (raw)

netdev->irq is unsigned, so it's never less than zero.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/net/ethernet/micrel/ks8851_mll.c b/drivers/net/ethernet/micrel/ks8851_mll.c
index 10d5798..b8104d9 100644
--- a/drivers/net/ethernet/micrel/ks8851_mll.c
+++ b/drivers/net/ethernet/micrel/ks8851_mll.c
@@ -1544,7 +1544,7 @@ static int __devinit ks8851_probe(struct platform_device *pdev)
 
 	netdev->irq = platform_get_irq(pdev, 0);
 
-	if (netdev->irq < 0) {
+	if ((int)netdev->irq < 0) {
 		err = netdev->irq;
 		goto err_get_irq;
 	}

             reply	other threads:[~2012-02-17  6:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-17  6:44 Dan Carpenter [this message]
2012-02-17  8:00 ` Antwort: [patch] net/ethernet: ks8851_mll: signedness bug in ks8851_probe() Jan Weitzel
2012-02-19 23:58 ` David Miller

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=20120217064433.GC3666@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=adobriyan@gmail.com \
    --cc=danny.kukawka@bisect.de \
    --cc=davem@davemloft.net \
    --cc=j.weitzel@phytec.de \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=paul.gortmaker@windriver.com \
    --cc=thomas@m3y3r.de \
    /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