aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/s3c2410fb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/s3c2410fb.c')
-rw-r--r--drivers/video/s3c2410fb.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c
index e63f536e9fed..71fa6edb5c47 100644
--- a/drivers/video/s3c2410fb.c
+++ b/drivers/video/s3c2410fb.c
@@ -817,6 +817,12 @@ static int __init s3c24xxfb_probe(struct platform_device *pdev,
817 return -EINVAL; 817 return -EINVAL;
818 } 818 }
819 819
820 if (mach_info->default_display >= mach_info->num_displays) {
821 dev_err(&pdev->dev, "default is %d but only %d displays\n",
822 mach_info->default_display, mach_info->num_displays);
823 return -EINVAL;
824 }
825
820 display = mach_info->displays + mach_info->default_display; 826 display = mach_info->displays + mach_info->default_display;
821 827
822 irq = platform_get_irq(pdev, 0); 828 irq = platform_get_irq(pdev, 0);