diff options
author | Richard Genoud <richard.genoud@gmail.com> | 2013-05-31 10:28:38 -0400 |
---|---|---|
committer | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2013-05-31 15:18:30 -0400 |
commit | 65ac057bce426b4abdf42384c4e09e40a634df32 (patch) | |
tree | ae30cae5f0489e12c8720d3c5e8a8e1e60346059 | |
parent | 2436e8aa8abef2536dc3bfb554f8dcb3a8b07560 (diff) |
trivial: atmel_lcdfb: add missing error message
When a too small framebuffer is given, the atmel_lcdfb_check_var
silently fails.
Adding an error message will save some head scratching.
Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
-rw-r--r-- | drivers/video/atmel_lcdfb.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c index 540909de6247..6e6491fb83b7 100644 --- a/drivers/video/atmel_lcdfb.c +++ b/drivers/video/atmel_lcdfb.c | |||
@@ -461,8 +461,11 @@ static int atmel_lcdfb_check_var(struct fb_var_screeninfo *var, | |||
461 | if (info->fix.smem_len) { | 461 | if (info->fix.smem_len) { |
462 | unsigned int smem_len = (var->xres_virtual * var->yres_virtual | 462 | unsigned int smem_len = (var->xres_virtual * var->yres_virtual |
463 | * ((var->bits_per_pixel + 7) / 8)); | 463 | * ((var->bits_per_pixel + 7) / 8)); |
464 | if (smem_len > info->fix.smem_len) | 464 | if (smem_len > info->fix.smem_len) { |
465 | dev_err(dev, "Frame buffer is too small (%u) for screen size (need at least %u)\n", | ||
466 | info->fix.smem_len, smem_len); | ||
465 | return -EINVAL; | 467 | return -EINVAL; |
468 | } | ||
466 | } | 469 | } |
467 | 470 | ||
468 | /* Saturate vertical and horizontal timings at maximum values */ | 471 | /* Saturate vertical and horizontal timings at maximum values */ |