From patchwork Fri Nov 24 19:30:04 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: 10074541 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 113E860383 for ; Fri, 24 Nov 2017 19:30:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 06AD02A281 for ; Fri, 24 Nov 2017 19:30:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ECEE62A288; Fri, 24 Nov 2017 19:30:30 +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 905842A281 for ; Fri, 24 Nov 2017 19:30:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EC57D6E9FD; Fri, 24 Nov 2017 19:30:29 +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.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0936C6E9FD for ; Fri, 24 Nov 2017 19:30:27 +0000 (UTC) Received: from [192.168.1.3] ([78.53.250.25]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LqUan-1enVdF242L-00e1Ci; Fri, 24 Nov 2017 20:30:12 +0100 To: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-fbdev@vger.kernel.org, Tony Prisk , Bartlomiej Zolnierkiewicz From: SF Markus Elfring Subject: [PATCH] video/fbdev/wm8505fb: Delete an error message for a failed memory allocation in wm8505fb_probe() Message-ID: <8f4f12ca-f2b3-6b3b-5f4c-5519f13c474f@users.sourceforge.net> Date: Fri, 24 Nov 2017 20:30:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 Content-Language: en-GB X-Provags-ID: V03:K0:hTUb1YwaPGkoymR83tISus/3ALDVd71cbORnaJi+QExmT+JsNva R5evauuL951QhhLUYbsnpcXtNZ5PGb38myV/1/HRaRZTgWvGqIhE+b5F8irzG0pPWDVcESR jf6gqZEx3zKL1rjnvgonexW1+Q0JnoC+ZKL0Q5K86atugykeI2M6Zf2GbUvCuTAbIBKBWLk DHNr7zHwUWtbNQjMgmq1w== X-UI-Out-Filterresults: notjunk:1; V01:K0:0hoASkY9jvo=:LoFsIpoDr5iszGxRznOPlj 1FAOp25+/23wkv2hncrt9VxyGMJgpsRrNo0snllUTIUxw58AkzAtMMP0Ujo8QRWxSkITicjXK gk9mjlqbXaPLQ9NUoNbcUGi+87hO4AjYb9lUtee7KQxCCJ5SRCCKLo4q72EZpEP6qZK6mACZX LFYOZ/tuuzmm9NNM3kmPeYX8v7AeeF1VUhF8ucfX7s/KU00DY/2q1jQNLWgKTFtfc3sIBSK88 LtUAQzQHqWB+R7aXeU4R5jdlD3PYF15BV2djJeM2ENQzii4qVLlt/3EYXgMFoQkkWx+BFPjLy FSNuOVr/CKeuOZt4/z+ehPW/VEJJclxSOAyGHuscQpeTASwPW3j7YlDg9rMtLr8BpJefVKe9N u6LnUn5U1sJfAS5XBD8WLtFDxCuIu2LJr6POVTK0bCvubA8TWU5/lGW41xg4696PMbkMUCofO tTAMKb0EsD2NsefDnC/4P+yGKHkYw6+FQfUI/y74kFn8+Ai2rC2qY/0efPpy6ADYRokN7Noy7 cy9jRp4KbDzbQEIud8bXFUL2+2mmAEQYOx4Ek0rl9pH/ewvCTQ9oNPPdloA1Kx8e47DdFDMGc L2G/4r9c0f2WS0dTsavQ9XU4nG16RU5LA4cmyFsGJyMIdF+1fmGMDcWpgl4+mKOO1qyelRLTx qyb7I9RdG2Ntz7tX8GEVfvU7ZZITyNSfWz6QQZpWizsgElZphOnuImApcBkaRB0xLs9QkHOZF 8zlefpmLvFqoT3MSJn2je/1XwhDn6uQh+778sXLJZ0r6gg5KtpukKczU3EhelcbPJO0Eo6/zp j6vWzTdCUbatmdrA5cT/vJMx3wAD4rKm3Sh7vL+by9Y7ZvNz4w= 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: Fri, 24 Nov 2017 20:22:10 +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 --- drivers/video/fbdev/wm8505fb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/video/fbdev/wm8505fb.c b/drivers/video/fbdev/wm8505fb.c index 253ffe9baab2..8f0d5379861d 100644 --- a/drivers/video/fbdev/wm8505fb.c +++ b/drivers/video/fbdev/wm8505fb.c @@ -276,10 +276,8 @@ static int wm8505fb_probe(struct platform_device *pdev) fbi = devm_kzalloc(&pdev->dev, sizeof(struct wm8505fb_info) + sizeof(u32) * 16, GFP_KERNEL); - if (!fbi) { - dev_err(&pdev->dev, "Failed to initialize framebuffer device\n"); + if (!fbi) return -ENOMEM; - } strcpy(fbi->fb.fix.id, DRIVER_NAME);