From 44e439b46bd14d891fd65950d10bfb17b7f1c431 Mon Sep 17 00:00:00 2001
From: Afzal Mohammed <afzal@ti.com>
Date: Mon, 31 Dec 2012 01:03:41 +0530
Subject: [PATCH 10/51] video: da8xx-fb: ensure non-null cfg in pdata

Ensure that platform data contains pointer for lcd_ctrl_config.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
---
 drivers/video/da8xx-fb.c |    5 +++++
 1 file changed, 5 insertions(+)

Index: linux-3.12.36-rt50-r4s2/drivers/video/da8xx-fb.c
===================================================================
--- linux-3.12.36-rt50-r4s2.orig/drivers/video/da8xx-fb.c
+++ linux-3.12.36-rt50-r4s2/drivers/video/da8xx-fb.c
@@ -1392,6 +1392,11 @@ static int fb_probe(struct platform_devi
 		goto err_pm_runtime_disable;
 	}
 
+	if (!lcd_cfg) {
+		ret = -EINVAL;
+		goto err_pm_runtime_disable;
+	}
+
 	da8xx_fb_info = framebuffer_alloc(sizeof(struct da8xx_fb_par),
 					&device->dev);
 	if (!da8xx_fb_info) {