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: 10076165 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 C2FFE605BD 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 99BFA288F6 for ; Mon, 27 Nov 2017 09:38:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8C24728917; 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=-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 3902228917 for ; Mon, 27 Nov 2017 09:38:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751292AbdK0Jid (ORCPT ); Mon, 27 Nov 2017 04:38:33 -0500 Received: from mout.web.de ([212.227.17.11]:49877 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751277AbdK0Jic (ORCPT ); Mon, 27 Nov 2017 04:38:32 -0500 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 Cc: LKML , kernel-janitors@vger.kernel.org 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= 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: 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; }