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: 10074545 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 B4A4060383 for ; Fri, 24 Nov 2017 19:31:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AB1FB2A281 for ; Fri, 24 Nov 2017 19:31:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9FC5F2A288; Fri, 24 Nov 2017 19:31:04 +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 5EB482A281 for ; Fri, 24 Nov 2017 19:31:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753600AbdKXTbD (ORCPT ); Fri, 24 Nov 2017 14:31:03 -0500 Received: from mout.web.de ([212.227.15.14]:63659 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751024AbdKXTbB (ORCPT ); Fri, 24 Nov 2017 14:31:01 -0500 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 Cc: LKML , kernel-janitors@vger.kernel.org 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= 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: 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);