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: 10075395 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 2B20160353 for ; Sun, 26 Nov 2017 14:16:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E53127853 for ; Sun, 26 Nov 2017 14:16:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1209728956; Sun, 26 Nov 2017 14:16:52 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C27BB27853 for ; Sun, 26 Nov 2017 14:16:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752177AbdKZOQu (ORCPT ); Sun, 26 Nov 2017 09:16:50 -0500 Received: from mout.web.de ([212.227.15.4]:55087 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752070AbdKZOQt (ORCPT ); Sun, 26 Nov 2017 09:16:49 -0500 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 Cc: LKML , kernel-janitors@vger.kernel.org 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= Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org 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);