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: 10074603 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 3E4B260375 for ; Fri, 24 Nov 2017 21:28:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 30F422A15A for ; Fri, 24 Nov 2017 21:28:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 256732A1AE; Fri, 24 Nov 2017 21:28:28 +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 CD3662A15A for ; Fri, 24 Nov 2017 21:28:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753769AbdKXV21 (ORCPT ); Fri, 24 Nov 2017 16:28:27 -0500 Received: from mout.web.de ([212.227.15.14]:60887 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753730AbdKXV20 (ORCPT ); Fri, 24 Nov 2017 16:28:26 -0500 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" Cc: LKML , kernel-janitors@vger.kernel.org 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= 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 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;