summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev/cobalt_lcdfb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/fbdev/cobalt_lcdfb.c')
-rw-r--r--drivers/video/fbdev/cobalt_lcdfb.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/video/fbdev/cobalt_lcdfb.c b/drivers/video/fbdev/cobalt_lcdfb.c
index 2d3b691f3fc4..038ac6934fe9 100644
--- a/drivers/video/fbdev/cobalt_lcdfb.c
+++ b/drivers/video/fbdev/cobalt_lcdfb.c
@@ -308,6 +308,11 @@ static int cobalt_lcdfb_probe(struct platform_device *dev)
info->screen_size = resource_size(res);
info->screen_base = devm_ioremap(&dev->dev, res->start,
info->screen_size);
+ if (!info->screen_base) {
+ framebuffer_release(info);
+ return -ENOMEM;
+ }
+
info->fbops = &cobalt_lcd_fbops;
info->fix = cobalt_lcdfb_fix;
info->fix.smem_start = res->start;