From patchwork Fri Oct 26 07:01:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jingoo Han X-Patchwork-Id: 1650001 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id A6BCD3FD4E for ; Fri, 26 Oct 2012 07:01:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756616Ab2JZHBm (ORCPT ); Fri, 26 Oct 2012 03:01:42 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:40510 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756600Ab2JZHBl (ORCPT ); Fri, 26 Oct 2012 03:01:41 -0400 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MCH0067SNIBTIA0@mailout1.samsung.com> for linux-fbdev@vger.kernel.org; Fri, 26 Oct 2012 16:01:39 +0900 (KST) X-AuditID: cbfee61a-b7fa66d0000004cf-9b-508a35532934 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 83.41.01231.3553A805; Fri, 26 Oct 2012 16:01:39 +0900 (KST) Received: from DOJG1HAN02 ([12.23.120.99]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MCH004LONIRU350@mmp2.samsung.com> for linux-fbdev@vger.kernel.org; Fri, 26 Oct 2012 16:01:39 +0900 (KST) From: Jingoo Han To: 'Florian Tobias Schandinat' Cc: linux-fbdev@vger.kernel.org, 'Jingoo Han' References: <002101cdb347$86236950$926a3bf0$%han@samsung.com> In-reply-to: <002101cdb347$86236950$926a3bf0$%han@samsung.com> Subject: [PATCH 2/3] video: s3c-fb: return an error when bpp is invalid Date: Fri, 26 Oct 2012 16:01:39 +0900 Message-id: <002201cdb347$bf4459b0$3dcd0d10$%han@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Ac2zR4YHt9GLYlV0Sc+1eD0FYs6X0AAABY+w Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrDLMWRmVeSWpSXmKPExsVy+t9jQd1g064Ag9WPrSxO9H1gdWD0+LxJ LoAxissmJTUnsyy1SN8ugSvj27bV7AVzWSv6Pn9ibmBcwtLFyMkhIWAicXP+TGYIW0ziwr31 bF2MXBxCAtMZJSbeXckK4cxikliw5gM7SBWbgJrEly+HgWwODhEBK4lNWzVBwswCzhITbpxg A7GFBGwlFu2fygpicwrYSRxt2QbWKizgLtE88RLYMhYBVYlJ2z6A2bxA9U+/bWSCsAUlfky+ xwIxU0ti/c7jTBC2vMTmNW+ZQdZKCKhLPPqrCxIWETCSOHrnBCNEiYjEvhfvGCcwCs1CMmkW kkmzkEyahaRlASPLKkbR1ILkguKk9FxDveLE3OLSvHS95PzcTYzgMH4mtYNxZYPFIUYBDkYl Ht6IlM4AIdbEsuLK3EOMEhzMSiK8u6cChXhTEiurUovy44tKc1KLDzFKc7AoifM2e6QECAmk J5akZqemFqQWwWSZODilGhh3We1JOCT51duTt+Bh2CFvdUGTyHTT923KRaKWeUuKVX/uco5e ceS8/M5JdwUMW7av7bzR9X3KqcwtKUJSvjVF9QtPLIwym7KrfiKn8avMQ/tWXFzsVVrxzM9u 69G3pTf2r/r+frJZ3PvOvUfygq0fmcqY8e+ML2C5lfK3/ndz9tP84LS1J2WVWIozEg21mIuK EwEFwr9bXwIAAA== Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org 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 --- drivers/video/s3c-fb.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c index 89cd278..f453b8b 100644 --- a/drivers/video/s3c-fb.c +++ b/drivers/video/s3c-fb.c @@ -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__);