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: 10093543 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 6DD5F6056E for ; Tue, 5 Dec 2017 18:00:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 65A9229875 for ; Tue, 5 Dec 2017 18:00:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5A736298E9; Tue, 5 Dec 2017 18:00: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=-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 F139A29875 for ; Tue, 5 Dec 2017 18:00:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E427D6E12E; Tue, 5 Dec 2017 18:00:36 +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.4]) by gabe.freedesktop.org (Postfix) with ESMTPS id 351386E12E for ; Tue, 5 Dec 2017 18:00:34 +0000 (UTC) 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" 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= 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: 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);