From patchwork Tue Dec 5 18:00:22 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: 10093549 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 3537E6056E for ; Tue, 5 Dec 2017 18:00:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2C966298F3 for ; Tue, 5 Dec 2017 18:00:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 20D68298F8; Tue, 5 Dec 2017 18:00:52 +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 C9922298F3 for ; Tue, 5 Dec 2017 18:00:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752376AbdLESAi (ORCPT ); Tue, 5 Dec 2017 13:00:38 -0500 Received: from mout.web.de ([212.227.15.4]:60412 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752310AbdLESAh (ORCPT ); Tue, 5 Dec 2017 13:00:37 -0500 Received: from [192.168.1.3] ([77.181.246.157]) by smtp.web.de (mrweb001 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MK2JZ-1eLSAh3xg5-001S3q; Tue, 05 Dec 2017 19:00:27 +0100 To: linux-fbdev@vger.kernel.org, linux-parisc@vger.kernel.org, dri-devel@lists.freedesktop.org, Bartlomiej Zolnierkiewicz , Helge Deller , "James E. J. Bottomley" Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Subject: [PATCH] video/console/sticore: Delete an error message for a failed memory allocation in sti_try_rom_generic() Message-ID: <6b8dde60-0550-5fb3-c7a5-5f6282259186@users.sourceforge.net> Date: Tue, 5 Dec 2017 19:00:22 +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:CeTon/09FpI5rsFRBJGkddZ+lXVu7j4bdCNcEjLyFhrAhQzYBDP Luje+BufsOZaj+VlrHOlNroTuLIlylreWWpuE07iV74ZoOMn+811qHo61g5MIfCjHgAJeXa nKekF58vOl1p5s5EHYT+AJaERpH3sQrkv4rfF1aKtW/z96JeNA+HBLDhRXwApf6h01nKWF8 73GG5Qs01IGcCn0mFGL3A== X-UI-Out-Filterresults: notjunk:1; V01:K0:5jwDyvfyIh8=:P/0rIHWM3o9JqxJbaKvicJ W8LRVsmxfYctZNfPHbUZykGrOTLK3IBCN4+XHiJuyzPv54/V/Trxm3Cx9WjTa5GZ/7N9hh1Vo B6Ww3f7LGbnXznIOqaG1u8paK5wWpc3/zqrHhnrkPx4NI/b/9wsfEDN1UD7c0nGjVRE4Wlrsw 5mDIpzUmVSlLFXO1eO7zwVFYR9dMsnx7P/RiWDkSwewytswzSWuXzLgIErFv9mKhxdFxUm1Lx kUyrpOYUhuj2JWvVpHDFMW5I8jL/akuLbgbiK2wCXoJAjjXQMpgftzjrxFog8rHNCmmzL4f1D l5gTmQpVVTNkYDan0DRjrK2MVXJYr5oMHKdA8M0FpFZ5oHtz8gOWDomsBkbtzsHk7nCe17cPz Xb4/FcwRAIAmfS4zDswmHDTpXrWc7Hdo96RDCCxaERJ3McNDbmhSE6lHeFx7HK9o3yq9r+BIf tuoXYNyC11VmED6vtDYmgxkMJhiRmgJNiPJXNKiJU5qFOh2z7yAZTOld7q62X+mJwSJsZwmCW hPZ5lDFK90N3YmpHwP6hPuFb31KcRQuEiNm8zUG/s2TNMDaign6YslWfD3SR1b+xhmZbTyRiF mRvWhCP1G5QYE7GD9TDn0pOAzO5LqobD2WA00zX1j0ETMzmGmrvO5VC9hG3mBrj5b20vnLxq7 kSIA5j0rqr9idN8LBnJnnBLYRMgqstPpTDFH7vprxH2qtihsF3EtIMMtUJj/1YZn6EMen71Ua Zxs1jQ9E2IehdQzixXLlX7fTleU7LpHxS5JmE17551jBx2IdyHBJM2AxiAbpnPVzH6t53JolF WnAwNjLJgsPu6tbxUgZADIQ1ICParh8Emmc90CUkKrVYWW0CnY= Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Tue, 5 Dec 2017 18:45:42 +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/console/sticore.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/video/console/sticore.c b/drivers/video/console/sticore.c index d1d3796773aa..08b822656846 100644 --- a/drivers/video/console/sticore.c +++ b/drivers/video/console/sticore.c @@ -827,10 +827,8 @@ static struct sti_struct *sti_try_rom_generic(unsigned long address, } sti = kzalloc(sizeof(*sti), GFP_KERNEL); - if (!sti) { - printk(KERN_ERR "Not enough memory !\n"); + if (!sti) return NULL; - } spin_lock_init(&sti->lock);