From patchwork Sun Jan 7 11:58:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 10148169 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 37D646037E for ; Sun, 7 Jan 2018 11:59:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 28D662890E for ; Sun, 7 Jan 2018 11:59:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1DC1328956; Sun, 7 Jan 2018 11:59:38 +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 BD8E62890E for ; Sun, 7 Jan 2018 11:59:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752941AbeAGL7h (ORCPT ); Sun, 7 Jan 2018 06:59:37 -0500 Received: from mout.web.de ([212.227.15.4]:62885 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752852AbeAGL7f (ORCPT ); Sun, 7 Jan 2018 06:59:35 -0500 Received: from [192.168.1.3] ([78.48.134.178]) by smtp.web.de (mrweb001 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MCZP8-1egR4i3ghe-009MBL; Sun, 07 Jan 2018 12:58:59 +0100 Subject: [PATCH v2 2/2] video/fbdev/stifb: Delete an error message for a failed memory allocation in stifb_init_fb() From: SF Markus Elfring To: linux-fbdev@vger.kernel.org, linux-parisc@vger.kernel.org, dri-devel@lists.freedesktop.org, Bartlomiej Zolnierkiewicz , Helge Deller , "James E. J. Bottomley" , Rolf Eike Beer Cc: LKML , kernel-janitors@vger.kernel.org References: <7dcd32b6-9691-14a1-29cf-3a746ef5adfc@users.sourceforge.net> <25624997.nONnEdNj0s@daneel.sf-tec.de> <1680261.Msdj7gi9fB@amdc3058> <889131fe-199c-3bef-0781-00761b807426@users.sourceforge.net> Message-ID: Date: Sun, 7 Jan 2018 12:58:47 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <889131fe-199c-3bef-0781-00761b807426@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:/sXrzfDDFOYotTwN2kA38XEHBJZGRYzhmta5+GVVfb4JmO80GGS 9aJqQjbxf2eDNv7H5Dc5jar7gmu+r5iZMjZQ/e95+uEYALr6vd1S/Z4ieNuqWzc6abZ0hMv HWcqs3qj5VH9XIBP3L1fAZ5Pqp7H4RKYNCEFCGfKw7PB4+qgl71pqVzu8NwC7vCVEKNWUFy MTTwn1UmzJ+4cT8bi5LMw== X-UI-Out-Filterresults: notjunk:1; V01:K0:Xx8ef7P8KGo=:URRcSH57CHDMjE8ZDteMGd DQQNgapgd+NlZ9DHzpH2mYme51kUKkBlbHeCyWU4VrX/QC0EBGSOp1nEBJOKOc2TsH4hUlCUF IUlISwF0hHndW0nREmm2whUvIIhzNlQNyMTqgnL7KSswgiepzniUTJZeykVj2jVTrfrxLEiTS FrJnRcx4WaMxFl3BqGYGvi1+xLgF+siXRhxRgH+Dzey+Fw5Tg/XenoglpiE/VgVbxtJJPkYMZ HvDaz2kL9zsB8mV5KQMBxY1VHOa5/X7BbfIuk7CdOmbzNxI+i3oitg4H6MaQ/FxLosUJNJVXO 2zVfth8sPcAlcclgc8Vub3yCZ0Yp2PPvzvPi3uTpSD+k9RO/6ajZIvqlfkhvqhHYssgMxL6Qi ieFot3LZeyhZX0ix5R61O/WH7lxNLHEUctJ8yUeZig54JB1MbLTqET1eHFyb4f8HcdW/35uAj Ieg8ZYw7vSXQBvk15HjZVbsVV4Mrbcj35a9t5555C2Rf1nWx7m2Jb+bbP2BD3jshrBiKnt0K8 tWbwcFsSdZgoN69zu+kiXbqup89KATW9GEDo5oAhCDfH92BCadbmCt5IraBy0eqnoqp88EmEA FHkuRuYFpUjmdFrbsr5OVKNURYA13wNuw1SQoGspLdgtzGVWQb7aZ2vD9McqttHCBoZsCdxMW 3UsP2WZlCU7GKfXXLTy2RJJrXehRP5hLhEMGwEpcWBahVZc2m8f8Al/4jUcCZ1nccvdxTeufu Wvu243RO/mYfM+lnk3woq66nLi8kfT2uP/SXfKchDavXYoifXzhYje3Ta4k8FVhax/tuBbWnt YzkEGXfgybFoKp7mLvbtRsMNVX4MaeHa0tRIFCiPtMxuGQMfWs= 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, 7 Jan 2018 12:34:22 +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 --- v2: This update suggestion was rebased on source files from the software "Linux next-20180105" together with a change for an error code. drivers/video/fbdev/stifb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/video/fbdev/stifb.c b/drivers/video/fbdev/stifb.c index 511a594889af..dec8efb4f256 100644 --- a/drivers/video/fbdev/stifb.c +++ b/drivers/video/fbdev/stifb.c @@ -1126,10 +1126,8 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref) int bpp, xres, yres; fb = kzalloc(sizeof(*fb), GFP_ATOMIC); - if (!fb) { - printk(KERN_ERR "stifb: Could not allocate stifb structure\n"); + if (!fb) return -ENOMEM; - } info = &fb->info;