diff options
author | Nicolas Kaiser <nikai@nikai.net> | 2010-11-15 05:59:42 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-17 15:39:54 -0500 |
commit | 28cb6ccd2c7e86b3a4db94c7062cd27937bed424 (patch) | |
tree | 062200bdbf581b3f1dda656de1f13152d6b82d84 /drivers/net/gianfar.c | |
parent | 870634b0b641271acb2e22df06ddda0c794b89a3 (diff) |
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 'drivers/net/gianfar.c')
-rw-r--r-- | drivers/net/gianfar.c | 7 |
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, | |||
577 | irq_of_parse_and_map(np, 1); | 577 | irq_of_parse_and_map(np, 1); |
578 | priv->gfargrp[priv->num_grps].interruptError = | 578 | priv->gfargrp[priv->num_grps].interruptError = |
579 | irq_of_parse_and_map(np,2); | 579 | irq_of_parse_and_map(np,2); |
580 | if (priv->gfargrp[priv->num_grps].interruptTransmit < 0 || | 580 | if (priv->gfargrp[priv->num_grps].interruptTransmit == NO_IRQ || |
581 | priv->gfargrp[priv->num_grps].interruptReceive < 0 || | 581 | priv->gfargrp[priv->num_grps].interruptReceive == NO_IRQ || |
582 | priv->gfargrp[priv->num_grps].interruptError < 0) { | 582 | priv->gfargrp[priv->num_grps].interruptError == NO_IRQ) |
583 | return -EINVAL; | 583 | return -EINVAL; |
584 | } | ||
585 | } | 584 | } |
586 | 585 | ||
587 | priv->gfargrp[priv->num_grps].grp_id = priv->num_grps; | 586 | priv->gfargrp[priv->num_grps].grp_id = priv->num_grps; |