summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlejandro Gonzalez <alex.gonzalez@digi.com>2010-05-26 13:33:24 +0200
committerAlejandro Gonzalez <alex.gonzalez@digi.com>2010-05-26 13:33:24 +0200
commit7f84f40f9cce6dfd9acf73e22863610f057861fd (patch)
treeab9b1dceeb48705ae435b3b77b72524c2d79ba7b
parent566834514389a8939cbbc3c37961555da33e8be1 (diff)
ccwmx51: Fix crash when LCD panel is not included in command line
arguments Signed-off-by: Alejandro Gonzalez <alex.gonzalez@digi.com>
-rwxr-xr-xdrivers/video/mxc/ccwmx51_display.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/video/mxc/ccwmx51_display.c b/drivers/video/mxc/ccwmx51_display.c
index a4912cace5e1..70a5b25f3fe9 100755
--- a/drivers/video/mxc/ccwmx51_display.c
+++ b/drivers/video/mxc/ccwmx51_display.c
@@ -75,10 +75,11 @@ static int __devinit lcd_sync_probe(struct platform_device *pdev)
{
struct ccwmx51_lcd_pdata *plat = pdev->dev.platform_data;
- if (plat) {
- if (plat->reset)
- plat->reset();
- }
+ if (!plat)
+ return -ENODEV;
+
+ if (plat->reset)
+ plat->reset();
plcd_dev = pdev;
lcd_init_fb(registered_fb[plat->vif]);