video: s3c-fb: return an error when bpp is invalid
authorJingoo Han <jg1.han@samsung.com>
Fri, 26 Oct 2012 05:54:01 +0000 (14:54 +0900)
committerJingoo Han <jg1.han@samsung.com>
Mon, 26 Nov 2012 04:35:36 +0000 (13:35 +0900)
This patch returns an error, when bpp is invalid in
s3c_fb_check_var(). If invalid bpp is requested,
an error should be returned.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
drivers/video/s3c-fb.c

index 9cee67c..21e5d79 100644 (file)
@@ -330,6 +330,7 @@ static int s3c_fb_check_var(struct fb_var_screeninfo *var,
 
        default:
                dev_err(sfb->dev, "invalid bpp\n");
+               return -EINVAL;
        }
 
        dev_dbg(sfb->dev, "%s: verified parameters\n", __func__);