Skip to content

Commit

Permalink
gianfar: fix signedness issue
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
nikai3d authored and davem330 committed Nov 17, 2010
1 parent 870634b commit 28cb6cc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/net/gianfar.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 28cb6cc

Please sign in to comment.