summaryrefslogtreecommitdiffstats
path: root/drivers/net/gianfar.c
diff options
context:
space:
mode:
authorNicolas Kaiser <nikai@nikai.net>2010-11-15 11:59:42 +0100
committerDavid S. Miller <davem@davemloft.net>2010-11-17 21:39:54 +0100
commit28cb6ccd2c7e86b3a4db94c7062cd27937bed424 (patch)
tree062200bdbf581b3f1dda656de1f13152d6b82d84 /drivers/net/gianfar.c
parentnet: bnx2x: fix error value sign (diff)
downloadlinux-28cb6ccd2c7e86b3a4db94c7062cd27937bed424.tar.xz
linux-28cb6ccd2c7e86b3a4db94c7062cd27937bed424.zip
gianfar: fix signedness issue
irq_of_parse_and_map() has an unsigned return type. Testing for a negative error value doesn't work here. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/gianfar.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 49e4ce1246a7..d1bec6269173 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -577,11 +577,10 @@ static int gfar_parse_group(struct device_node *np,
irq_of_parse_and_map(np, 1);
priv->gfargrp[priv->num_grps].interruptError =
irq_of_parse_and_map(np,2);
- if (priv->gfargrp[priv->num_grps].interruptTransmit < 0 ||
- priv->gfargrp[priv->num_grps].interruptReceive < 0 ||
- priv->gfargrp[priv->num_grps].interruptError < 0) {
+ if (priv->gfargrp[priv->num_grps].interruptTransmit == NO_IRQ ||
+ priv->gfargrp[priv->num_grps].interruptReceive == NO_IRQ ||
+ priv->gfargrp[priv->num_grps].interruptError == NO_IRQ)
return -EINVAL;
- }
}
priv->gfargrp[priv->num_grps].grp_id = priv->num_grps;