From patchwork Fri Nov 24 21:28:12 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: 10074601 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 36E1F60375 for ; Fri, 24 Nov 2017 21:28:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1C8DB2A15A for ; Fri, 24 Nov 2017 21:28:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0EB472A1AE; Fri, 24 Nov 2017 21:28:27 +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 BFBC42A15A for ; Fri, 24 Nov 2017 21:28:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D83216E078; Fri, 24 Nov 2017 21:28:24 +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 4ABF66E078 for ; Fri, 24 Nov 2017 21:28:23 +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 0M5fxo-1f2TxO0oP2-00xcMe; Fri, 24 Nov 2017 22:28:14 +0100 To: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-parisc@vger.kernel.org, Bartlomiej Zolnierkiewicz , Helge Deller , "James E. J. Bottomley" From: SF Markus Elfring Subject: [PATCH] video/fbdev/stifb: Delete an error message for a failed memory allocation in stifb_init_fb() Message-ID: <7dcd32b6-9691-14a1-29cf-3a746ef5adfc@users.sourceforge.net> Date: Fri, 24 Nov 2017 22:28:12 +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:0oItc9RwMYqqO5ICuKqJlnb8NqwQQkoqKIEPSdgRbLGZk2H5pMy 0ok5Ts9l1E7Jjmz3hgl0EcmGvZTbkt72EaiJzQR92ztodVhrJ7BbJyDuDLVbkQ1v9aKAKwq +TTmKyNCiNKgve/ih6+FUZHkntdxON/TAzW+NL2FPQhYBuGQHrbFA21tvWqW9WJZBLDg3Un TlPIj86epuBNuXd/x2W6A== X-UI-Out-Filterresults: notjunk:1; V01:K0:6zNfQIYB0zw=:grUiDRbDUwbrCaolN17pXK nh5oCpK2rBwrgYjOmPYqJrQd2QicFCYZXIdaEGhEhg2nfbTM0Yw3Utb0M1MdBAHdk4h+Zj7GQ cnPX4DGAwvWZmMG64gx20BNHI+krGSj2mwfx9DNk8CzvjEt8uubmwFVIcCLoj9HfymLZSmAtO /3mLPXt9L/bIm+V0yq5avz69SnqzSgFsbejdDMvjTpbJjDeBi9d1ZbqS1+m+yr7rC6zH2XkiT rxPbIbLIdjHWbZrOfN0/g1+4ASXzvVfW0qUjRJ7OWU3v1wlul6QjGbZtQQITBE5KYUnlLbcb5 woN23kgv2wtm+j/0V2YDeZr71K3iqqZBw2T8hKnEIEuWwkdgcNkMb9KLSfXG6h3+y2J/UCXN0 NHKWfCymJeoCbInrXays1XXZzV4t0rro8bySTl66KYNJXlaLdFLwEuYzyKsHE7Pqk4FZCNPrv 4FJH4QWSFE4ldGEeRivYvfObA3yT7RF7M/Z+Lu5l5NeO7W8cSCjDCwauQykLy+WwJLYXz0M+w sPpgnP1uYoXyOfIXwp5674iblXxlIQ1EuzYk3UCDyaHNcO7uTStSJq6/qrFcXqs056wkXR01n 2HvdeuIgzLmwtYdot/NnwXJQnvZvwXVYDy0gG8d8dMMi9dboHujeuJU90J5RZUL1BfYjlAQdr E+5mZH96kGbTAr7mIktJyWWmtMMMq97cODYJKCBSBW0NHcUq2XUqbEpfGZEKwlTVWshfZlTyU 1VcJVLfmRPQqgITqrmvytSVhUrDAFPzGu6qxDkvyTzYOHxmdz80zkt/vFo/I59rEDy2KRmdeC 4g5WP/4FY9mL3eMZLP16xZBtr4Etqi7OcwarGakOeGj6RLcK68= 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 22:22:06 +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/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 6ded5c198998..fe217a2f7d21 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 -ENODEV; - } info = &fb->info;