summaryrefslogtreecommitdiffstats
path: root/drivers/video/pxa.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/pxa.c')
-rw-r--r--drivers/video/pxa.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/video/pxa.c b/drivers/video/pxa.c
index b4ce3a1bf8..d6d11ae610 100644
--- a/drivers/video/pxa.c
+++ b/drivers/video/pxa.c
@@ -29,6 +29,7 @@
#include <fb.h>
#include <init.h>
#include <malloc.h>
+#include <linux/err.h>
#include <mach/clock.h>
#include <mach/pxa-regs.h>
@@ -499,6 +500,8 @@ static int pxafb_probe(struct device_d *dev)
fbi->mode = pdata->mode;
fbi->regs = dev_request_mem_region(dev, 0);
+ if (IS_ERR(fbi->regs))
+ return PTR_ERR(fbi->regs);
fbi->dev = dev;
fbi->lcd_power = pdata->lcd_power;