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: 10207617 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 2DD2E60247 for ; Thu, 8 Feb 2018 17:52:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1AF7629142 for ; Thu, 8 Feb 2018 17:52:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0D40C29341; Thu, 8 Feb 2018 17:52:46 +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,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 95F9C29142 for ; Thu, 8 Feb 2018 17:52:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Date:Message-ID:Subject: From:To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=+UQ0Bf6DZLHTBpzcl/s10q+LLMb+rrNDxQePf63MU5o=; b=hPkWjq6hPEEK9U t9HtnTDzKOvzpq0pBys5uA0LR93wzJdYpXiUq4B5kcU8bolH/A/HyDAqXMAulupxzd0BRJRubAGVX g1kO2nGtyeeks06LLfk+r14vQI0c6gSsXNTvp5l358htsZlRePxXvWP0gdBirPFByUdgIYA2hjRDF KJ8RBmMlvSeHuyO5CISWjCmD+ej+2tTuOXJgc/6HZNjMlTnghx+kqePFRV9Fpgb0d8qI88liBj6pa wHraksR0t95Tonpnna+oY8Xv4FaolpGBQ1ErOz04qnwtEGJaWGPDIDDmRtnmprQt2oG9FRkGu/yQG krcA2EZMnT5CyaxrCSBQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1ejqNI-0000nJ-Bj; Thu, 08 Feb 2018 17:52:44 +0000 Received: from mout.web.de ([212.227.15.3]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ejqNE-0000eK-U1 for linux-arm-kernel@lists.infradead.org; Thu, 08 Feb 2018 17:52:42 +0000 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: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel-janitors@vger.kernel.org, LKML Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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);