From patchwork Thu Feb 8 17:52:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 10207615 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 55B2C60247 for ; Thu, 8 Feb 2018 17:52:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F55628872 for ; Thu, 8 Feb 2018 17:52:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 31848295A8; Thu, 8 Feb 2018 17:52:25 +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 791682941D for ; Thu, 8 Feb 2018 17:52:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 01A756E650; Thu, 8 Feb 2018 17:52:23 +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.3]) by gabe.freedesktop.org (Postfix) with ESMTPS id 378CB6E650 for ; Thu, 8 Feb 2018 17:52:21 +0000 (UTC) Received: from [192.168.1.2] ([78.49.237.151]) by smtp.web.de (mrweb001 [213.165.67.108]) with ESMTPSA (Nemesis) id 0Lzate-1eom4n420A-014kpr; Thu, 08 Feb 2018 18:52:12 +0100 To: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, David Airlie , Inki Dae , Joonyoung Shim , Krzysztof Kozlowski , Kukjin Kim , Kyungmin Park , Seung-Woo Kim From: SF Markus Elfring Subject: [PATCH] drm/exynos: g2d: Delete an error message for a failed memory allocation in two functions Message-ID: Date: Thu, 8 Feb 2018 18:52:07 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 Content-Language: en-US X-Provags-ID: V03:K0:fQYMOc3XEJUDVzV3IYQC5KePaeztR3A9CeJ5xwfR8QYcsUf5ubr si67bxJUAE1g02ByDLLozjpG90N8u+/FIasO01cu4u3tBbbirpD8apFoGMvnkWsVkvPrxR3 RDJbMvrcBOJ5Z182EYl1vLnm+FqctmlooFZliTHKH2ADECjNFiEDbtozETyKofx2sNYu2R6 m5KqTqQ0RZ4NfYe6hB5tA== X-UI-Out-Filterresults: notjunk:1; V01:K0:OTx37NLgaGY=:cBTEvtLvVMUdASe6FLOUq0 X7Dn4eoEixOD/iUgFrfMEODlvYJf923xpz12StOlFsh0EtStGsN/3hmC3eCNPA6C4nwuPYsQS FtfOqnyrKeZ19L8P5G2cP3TiwJBL8P3GJgU2FNqpeY/ijS0c/i8yxsRGu07HoXs3v/51pzZqi RGJPh/XnKBmf5Uqla/54F/70GwiQWfSdC6crRdADJ5N98QQhxrkmBEkWgy4m0H00TDyaOMG0G ROs6RLRWSGK2mXUR/7J4BzD9ks0U/qKtPl5jIZuJbPmj/g0shlIQwls+k8bI9yCm3ij1ksmp5 NMZw43/RaSedpiCRduL/W2SN4tSNKoqBFWwqPzTyX3+9BV3uPs6g7OERfWd9ZdFHC24myyxCl gGOLTU6l9aTuvMaL8O63W7onISBDBAo7dm0keOp9f2nSENl7u1/b8le9JBEUhFgBe6PckVbRO lbxYxnwmsz8qNncMFcwM/OpO0YczcwQOBkAdbjzIgs6ukcFsBwbKOS7LcyXGanAdkuDA8TTyQ 9AFdZ7nQ8NRLK2Qudl+PlqxhkiBlYqllzxG6iZ+boFg9RBJBaVZBh2ioP7huAnOoEstye6l0A RXY/+CZfWMVAr2xAPvOMkuNDmadOPgYEubNSA+G9oeplgnZJH8bk+vaDVHnZj/V4BhG9pb6ra ansy7+G7UJxromUq4cyWXArKtku3vrCZXCzhK8YQKwFQA1H2YZkTrliMu0eU6X/N/Byqe7IhC svVWncEjGyfgjwyajIrwKNNKYYzlONqiNO3rQgg/brW8thXDcy9QhCCKz+opjAcMvU6fZ6r9J JfkbqCaPqYPcP8P3asnMO65YO3VkXxNpazLKwIBRe83zDPoUOM= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel-janitors@vger.kernel.org, LKML Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Thu, 8 Feb 2018 18:42:51 +0100 Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/gpu/drm/exynos/exynos_drm_g2d.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c b/drivers/gpu/drm/exynos/exynos_drm_g2d.c index 2b8bf2dd6387..5eb0d3292525 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c +++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c @@ -286,7 +286,6 @@ static int g2d_init_cmdlist(struct g2d_data *g2d) node = kcalloc(G2D_CMDLIST_NUM, sizeof(*node), GFP_KERNEL); if (!node) { - dev_err(dev, "failed to allocate memory\n"); ret = -ENOMEM; goto err; } @@ -1358,10 +1357,9 @@ int exynos_g2d_exec_ioctl(struct drm_device *drm_dev, void *data, return -EFAULT; runqueue_node = kmem_cache_alloc(g2d->runqueue_slab, GFP_KERNEL); - if (!runqueue_node) { - dev_err(dev, "failed to allocate memory\n"); + if (!runqueue_node) return -ENOMEM; - } + run_cmdlist = &runqueue_node->run_cmdlist; event_list = &runqueue_node->event_list; INIT_LIST_HEAD(run_cmdlist);