提交 28cb6ccd 编写于 作者: N Nicolas Kaiser 提交者: David S. Miller

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: NNicolas Kaiser <nikai@nikai.net>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 870634b0
...@@ -577,11 +577,10 @@ static int gfar_parse_group(struct device_node *np, ...@@ -577,11 +577,10 @@ static int gfar_parse_group(struct device_node *np,
irq_of_parse_and_map(np, 1); irq_of_parse_and_map(np, 1);
priv->gfargrp[priv->num_grps].interruptError = priv->gfargrp[priv->num_grps].interruptError =
irq_of_parse_and_map(np,2); irq_of_parse_and_map(np,2);
if (priv->gfargrp[priv->num_grps].interruptTransmit < 0 || if (priv->gfargrp[priv->num_grps].interruptTransmit == NO_IRQ ||
priv->gfargrp[priv->num_grps].interruptReceive < 0 || priv->gfargrp[priv->num_grps].interruptReceive == NO_IRQ ||
priv->gfargrp[priv->num_grps].interruptError < 0) { priv->gfargrp[priv->num_grps].interruptError == NO_IRQ)
return -EINVAL; return -EINVAL;
}
} }
priv->gfargrp[priv->num_grps].grp_id = priv->num_grps; priv->gfargrp[priv->num_grps].grp_id = priv->num_grps;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册