summaryrefslogtreecommitdiffstats
path: root/drivers/net/fec_mpc5200.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/fec_mpc5200.c')
-rw-r--r--drivers/net/fec_mpc5200.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/fec_mpc5200.c b/drivers/net/fec_mpc5200.c
index 41a3b58d53..f431d79d1d 100644
--- a/drivers/net/fec_mpc5200.c
+++ b/drivers/net/fec_mpc5200.c
@@ -16,6 +16,7 @@
#include <mach/sdma.h>
#include <mach/clocks.h>
#include <linux/phy.h>
+#include <linux/err.h>
#include "fec_mpc5200.h"
#define CONFIG_PHY_ADDR 1 /* FIXME */
@@ -655,6 +656,8 @@ int mpc5xxx_fec_probe(struct device_d *dev)
edev->parent = dev;
fec->eth = dev_request_mem_region(dev, 0);
+ if (IS_ERR(fec->eth))
+ return PTR_ERR(fec->eth);
fec->tbdBase = (FEC_TBD *)FEC_BD_BASE;
fec->rbdBase = (FEC_RBD *)(FEC_BD_BASE + FEC_TBD_NUM * sizeof(FEC_TBD));