Commit 0a6efc78 authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller

arcnet: fix signed bug in probe function

probe_irq_off() returns the first irq found or if two irqs are found
then it returns the negative of the first irq found.  We can cast
dev->irq to an int so that the test for negative values works.
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8e64159d
...@@ -90,14 +90,14 @@ static int __init com20020isa_probe(struct net_device *dev) ...@@ -90,14 +90,14 @@ static int __init com20020isa_probe(struct net_device *dev)
outb(0, _INTMASK); outb(0, _INTMASK);
dev->irq = probe_irq_off(airqmask); dev->irq = probe_irq_off(airqmask);
if (dev->irq <= 0) { if ((int)dev->irq <= 0) {
BUGMSG(D_INIT_REASONS, "Autoprobe IRQ failed first time\n"); BUGMSG(D_INIT_REASONS, "Autoprobe IRQ failed first time\n");
airqmask = probe_irq_on(); airqmask = probe_irq_on();
outb(NORXflag, _INTMASK); outb(NORXflag, _INTMASK);
udelay(5); udelay(5);
outb(0, _INTMASK); outb(0, _INTMASK);
dev->irq = probe_irq_off(airqmask); dev->irq = probe_irq_off(airqmask);
if (dev->irq <= 0) { if ((int)dev->irq <= 0) {
BUGMSG(D_NORMAL, "Autoprobe IRQ failed.\n"); BUGMSG(D_NORMAL, "Autoprobe IRQ failed.\n");
err = -ENODEV; err = -ENODEV;
goto out; goto out;
......
...@@ -213,7 +213,7 @@ static int __init com90io_probe(struct net_device *dev) ...@@ -213,7 +213,7 @@ static int __init com90io_probe(struct net_device *dev)
outb(0, _INTMASK); outb(0, _INTMASK);
dev->irq = probe_irq_off(airqmask); dev->irq = probe_irq_off(airqmask);
if (dev->irq <= 0) { if ((int)dev->irq <= 0) {
BUGMSG(D_INIT_REASONS, "Autoprobe IRQ failed\n"); BUGMSG(D_INIT_REASONS, "Autoprobe IRQ failed\n");
goto err_out; goto err_out;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment