From patchwork Sun Nov 26 14:16:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 10075393 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E119560353 for ; Sun, 26 Nov 2017 14:16:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D18D227853 for ; Sun, 26 Nov 2017 14:16:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C3E3B28956; Sun, 26 Nov 2017 14:16:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 642F927853 for ; Sun, 26 Nov 2017 14:16:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9F9816E001; Sun, 26 Nov 2017 14:16:49 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.web.de (mout.web.de [212.227.15.4]) by gabe.freedesktop.org (Postfix) with ESMTPS id 713106E001 for ; Sun, 26 Nov 2017 14:16:45 +0000 (UTC) Received: from [192.168.1.3] ([78.49.168.181]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0Lud96-1fINza4288-00zqps; Sun, 26 Nov 2017 15:16:39 +0100 Subject: [PATCH 1/2] video: s3c-fb: Delete an error message for a failed memory allocation in s3c_fb_probe() From: SF Markus Elfring To: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Bartlomiej Zolnierkiewicz , Jingoo Han References: <2c837da0-6b0f-12e7-4d76-960b660a8911@users.sourceforge.net> Message-ID: <734da0dc-cc64-50f5-7816-bf3f5dd2e9a4@users.sourceforge.net> Date: Sun, 26 Nov 2017 15:16:37 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <2c837da0-6b0f-12e7-4d76-960b660a8911@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:zBs2pjXOfGQLzpfHFTxhfyyZOiRjb9b+UNr/1Zos0PJfmvS6Qz6 eYBmPRh1Ace56g9dGfLTZQxsV1e0le20qxOwTsYiK5oTfyGnYwfuloSimp77h5/NnKIh6H/ +Z35URQIDHH/DYiwS0MzceqTek2RtOXW7KGaHpUzNAISRKwIRwxrPk5B2BxiDSZ/Ms0HJjq a3yRMXD4GSQYMaD7V104Q== X-UI-Out-Filterresults: notjunk:1; V01:K0:OtOHVUB9mbo=:CAx4zrkGhnLBObG61UQFtI hsBUTGWVmSi0Y0c/Nkm+wOW4hsW5ESfri8Oc19EX+r7I7HUGq3Zk06izcckiv6C7YtVB9X13h KXGX/6iT+mMT7NdhejVqhTB7ygQxjXkaqlLUHSwDY/BNkZwd124n7tVkcCRqgUOtlAFPQbiuc 7kruH0KCYdiFKQGTSlGQa+zllz6g16fcuN1yiu4itdjP0WBkt+XIl1U6OwNXzaRlb4I3h/gg5 EsPiIfuYQz/052JKSPwA8poBID07gbjV213cJOd378lHq9vWzQgOuv/zkr3lEwgEbn+OgNoiP 64xIF2MZv0qIwsb46CdLPBd1LlMYoSJQDQUSlrTC4ZoNkgJoqSm+3SEGX2aa9tTnrzlJlkYTC a7vRhOO8WpapuGavbHKvHpZ5hQqqGo4ppK37+ftOSC8kaagBWf4URuzw0F1QVx1NaWXgL4xe2 k4LO2Z+YxUBlR076ToZ8ecwiMmcgFBB3qJGGIj0GjGIph1n5lUZfsQbcbqAuhYFM744WKsxI+ DjIwBsE3bYGXZHvLvkhnEp0z+S7TKCjR0IhvVB2J3V2vPWTZeFA/3sS3UYsrpSVM2/p42Vcfx JsA/k0aMbsJZQbxvrfGqA+qEcRaAts6/FxgmiGr70+J/i/eo2FQIQvXgi6ZdOjtPZAQUPeez4 HoD2hFc7P78DrD1NWmMZiV6ozFZN/WzWQV75vjS8F2D0i+X9DfQmKvDNkP92JxzLUZYuEfonS rtYdoD9V/Iye1MAAeqUY0rspViomP5liklniwN6NTw+0j90OsjXTd85YdWiCSmSCS+IEs1RW1 dmcakBOkYrYXwY9uIgg8znAXQyw6inUazRiOveSfKxPWBEv3b8= Cc: kernel-janitors@vger.kernel.org, LKML X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Sun, 26 Nov 2017 15:00:16 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked-by: Jingoo Han --- drivers/video/fbdev/s3c-fb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/video/fbdev/s3c-fb.c b/drivers/video/fbdev/s3c-fb.c index 5f4f696c2ecf..0914c973cbd9 100644 --- a/drivers/video/fbdev/s3c-fb.c +++ b/drivers/video/fbdev/s3c-fb.c @@ -1384,10 +1384,8 @@ static int s3c_fb_probe(struct platform_device *pdev) } sfb = devm_kzalloc(dev, sizeof(struct s3c_fb), GFP_KERNEL); - if (!sfb) { - dev_err(dev, "no memory for framebuffers\n"); + if (!sfb) return -ENOMEM; - } dev_dbg(dev, "allocate new framebuffer %p\n", sfb);