summaryrefslogtreecommitdiffstats
path: root/drivers/net/fec_mpc52xx.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2007-11-01 08:22:35 -0600
committerJeff Garzik <jeff@garzik.org>2007-11-01 16:04:45 -0400
commit48d58459fe991e48bf7e6638a0ded0f8cbd2fa3b (patch)
treedee9ca6da613646505e57f521ecd64cb8b692f78 /drivers/net/fec_mpc52xx.c
parent644fdf9b08e51e172d54cb500473470edb4ba1e0 (diff)
downloadop-kernel-dev-48d58459fe991e48bf7e6638a0ded0f8cbd2fa3b.zip
op-kernel-dev-48d58459fe991e48bf7e6638a0ded0f8cbd2fa3b.tar.gz
Fix region size check in mpc5200 FEC driver
Driver shouldn't complain if the register range is larger than what it expects. This works around failures with some device trees. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/fec_mpc52xx.c')
-rw-r--r--drivers/net/fec_mpc52xx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c
index fc1cf0b..a8a0ee2 100644
--- a/drivers/net/fec_mpc52xx.c
+++ b/drivers/net/fec_mpc52xx.c
@@ -879,9 +879,9 @@ mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match)
"Error while parsing device node resource\n" );
return rv;
}
- if ((mem.end - mem.start + 1) != sizeof(struct mpc52xx_fec)) {
+ if ((mem.end - mem.start + 1) < sizeof(struct mpc52xx_fec)) {
printk(KERN_ERR DRIVER_NAME
- " - invalid resource size (%lx != %x), check mpc52xx_devices.c\n",
+ " - invalid resource size (%lx < %x), check mpc52xx_devices.c\n",
(unsigned long)(mem.end - mem.start + 1), sizeof(struct mpc52xx_fec));
return -EINVAL;
}
OpenPOWER on IntegriCloud