Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753426AbeAGL7h (ORCPT + 1 other); 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 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-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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; -- 2.15.1