From patchwork Mon Nov 27 09:38:18 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: 10076163 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 B54C260353 for ; Mon, 27 Nov 2017 09:38:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 88A5328C76 for ; Mon, 27 Nov 2017 09:38:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7B4AA28DF0; Mon, 27 Nov 2017 09:38:34 +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 7F845288F6 for ; Mon, 27 Nov 2017 09:38:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CEED789D7D; Mon, 27 Nov 2017 09:38:31 +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.17.11]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3774A89D7D for ; Mon, 27 Nov 2017 09:38:29 +0000 (UTC) Received: from [192.168.1.3] ([77.182.143.129]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0Lb1wz-1eyfIa226z-00kiQr; Mon, 27 Nov 2017 10:38:21 +0100 To: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Bartlomiej Zolnierkiewicz From: SF Markus Elfring Subject: [PATCH] video: adv7393fb: Delete two error messages for a failed memory allocation in bfin_adv7393_fb_probe() Message-ID: <21f1ee42-17f3-5012-0810-2d0a2890dcc1@users.sourceforge.net> Date: Mon, 27 Nov 2017 10:38:18 +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:UUNbK5dmGKaWrNEjeT7XqcscZuBvb9SWu1JU7ysLohuLhWFdcuK CpeeTLbABmm97g0yu41XUMb0ibs9G9OdbdugXD4w1pbhnPDA3LHirtO5TPMcQasQgCdKlLv BOXFCMPBGWZZLAY887DzDtzufEEmsjbAGGDoyAUBodSKXYXzYJvV63AwxyhRScAvbVUlF7b KmPZJO+ULdMFQEefzpIjA== X-UI-Out-Filterresults: notjunk:1; V01:K0:+8DiBrUa3CQ=:DcT4h5mJfGyXl5ZQmPANV3 YIzc+t9IhMylYI7GdtWuSXD3aNcle43nadGHjBm8er+ntyNJ8rLKpA7Db8NwqzNyI2q3FEjO/ BJ7a3z/jpTezm4/k4920ebcjiLFpg6D7JYFTPJgWQF6a8cWEHmb///+c/0ZfrqMwNflUYXeFK WXGB7gW50Uwbg/0q1xoLHZe/JS/463TlhVrnY3FWrBtWWB8RSbnREYT3AqyHvEIzcKqoG9zdR KL7e9iiF9iYahhzkZSpGGviW4RStr1lJV4ch377dlOHqr249sThP4LpkKU6OsN7+zLjJev8/D LnXGlhCcHtrX/34vaivqFmfQOKyEqHqgx3wRuwDBrp40lPm0uZBrNAXUGCrWA5uPnmloxPlwf o3vb55T+autEMPkR9slakLxLFQjcQRq8J+iyqWSD9hVRZuROXUgYvNRqRLjszxVAmVMZwjLI8 fXOWll2l3NDjm+L+WDgSK0o8D+Y5F8SsW2VsDWxSujJLe7LMyGtsxLjHXtMF+5cCJqtVviXF7 LiFyLRIFUcPCQitpe9XS7+wj6YJhS8FUWheGAVtFHi1SYyjb/0EP3fGVdjQyTOnQ83qbX5SXI VB8DuJ3RmLvnwFdNmzF76SkuwJj0vysqCWn8dARAPLi3bWal0/PkL6oJ8DHYlOmEsdZJZjpY+ SbNQQHgtkis6BjpArP/SdiKLGWm4MHBwCXvbm0PurO5dh4HjWPLsYjMTl0ib7GGiuHyQTcDpb S3S4jZbqTSeLTA8otqjFtFIo9EYWz/07p43rqxQ8GEMzb7LgJca1yXGK7e578J2TGaSfR6olC DKbem0GXSBgvRJiLGdmxZN2zCtZB0sA7jzBWdSWa1ZsGDXGY2c= 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: Mon, 27 Nov 2017 10:33:19 +0100 Omit extra messages 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/bfin_adv7393fb.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/video/fbdev/bfin_adv7393fb.c b/drivers/video/fbdev/bfin_adv7393fb.c index 542ffaddc6ab..aed6b934f009 100644 --- a/drivers/video/fbdev/bfin_adv7393fb.c +++ b/drivers/video/fbdev/bfin_adv7393fb.c @@ -389,10 +389,8 @@ static int bfin_adv7393_fb_probe(struct i2c_client *client, } fbdev = kzalloc(sizeof(*fbdev), GFP_KERNEL); - if (!fbdev) { - dev_err(&client->dev, "failed to allocate device private record"); + if (!fbdev) return -ENOMEM; - } i2c_set_clientdata(client, fbdev); @@ -461,7 +459,6 @@ static int bfin_adv7393_fb_probe(struct i2c_client *client, fbdev->info.pseudo_palette = kzalloc(sizeof(u32) * 16, GFP_KERNEL); if (!fbdev->info.pseudo_palette) { - dev_err(&client->dev, "failed to allocate pseudo_palette\n"); ret = -ENOMEM; goto free_fb_mem; }