From patchwork Wed Feb 7 20:23:35 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: 10205955 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 A26FA602D8 for ; Wed, 7 Feb 2018 20:23:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9278C290BD for ; Wed, 7 Feb 2018 20:23:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 86C84290C3; Wed, 7 Feb 2018 20:23:56 +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 1E295290BD for ; Wed, 7 Feb 2018 20:23:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1F7B489B97; Wed, 7 Feb 2018 20:23:55 +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.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1996689B97 for ; Wed, 7 Feb 2018 20:23:52 +0000 (UTC) Received: from [192.168.1.2] ([85.183.226.68]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LmhQx-1fI27v1xuF-00aIOZ; Wed, 07 Feb 2018 21:23:44 +0100 To: linux-tegra@vger.kernel.org, dri-devel@lists.freedesktop.org, David Airlie , Jonathan Hunter , Thierry Reding From: SF Markus Elfring Subject: [PATCH] drm/tegra/fb: Delete an error message for a failed memory allocation in tegra_fbdev_create() Message-ID: <0704416a-23f7-3ce3-2bd2-d6a8c106f10d@users.sourceforge.net> Date: Wed, 7 Feb 2018 21:23:35 +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:bLO10b90k9Og9SRgy9jFlDiqRVp7JR5TNPyyxj7XhbPLlvr9bX2 848+LGrZ6z3NDnEoDKvcMSUzT8giqkvdcJlm2vCAoWD47YqopeX/yFFFUHP80RVn1SD01bc ttE/A8/j9XW8VhBDQtf18WcPh0vX8MleD3nfv3pWPRzZ+uPJD795auery/LAY7Xip/mDMh6 UdHjhVmRklEnaMK7Inkvw== X-UI-Out-Filterresults: notjunk:1; V01:K0:rIa91ndW1HY=:SVdH5zuRtRblPDUPXlVYyL /uGzXFRlL1gFGOrPCPrtRYgzGo8mw4RUe3VX2XjKifOSSyBB//jBjY8vvan21rJ7/wiORGKf6 5Jedl2UEmm0N3qs/i9sLEVf55NsvFGx8t01s6WPX45GgRBEs9WrBWgYLNytEqUW42jAb0Si/o xgIJQmUPtljLfw9r9Ekn+Dmh+oSpVtEapJB7dmMJPsrwQ9qxhH3E2NT8SqBbKMTM/noe+MiWH yYei0F/QJyay6LqDy/oCGKA6IK0IbpEwzHLU9s3tw+0tily9zwbLxWrpCu/U2lFuyU+90uDlE nw6PKhMxweajCN/QRhzc8JGbichpKWqWRLXq+PJxKG/oym6Gz50aaeLN9CrP+JkWppIaZtvkf 93qhNCGhpFzkXvUtAP1sWeXw9c5pjElBJitIz1j0NCfOswpXWXf5pqSgZjt6VF8ge9FBDhVdw LKztacvhlyqgOIaKCgK6qIquInhPa+DIrX1OQhx3fQA9ScZHyMp+vmwV8Ou4iNyVehhqXCNnG ChvW4bHJki2ShKR8pG+oyN7HZKpqAZ6XH7U9tJM8xVBd2BVMj1rlg8RtMgeiVVyiddAiqoIa9 dT38L+XLMN/zuCeDd+fJvP61e/eza9o/rm/k3Y0d/BZpauiszjqD0uquAI+GV7hrPzizzSH9V 4d0f/YIWGJYmpdcLQstBg3n+hwY0RqPWTptEQlMya0wf51J/BFoSCdU/V02OYqI6uyFYQAFws 8m1Pefk1AFQ0U5QHyW6NaKqXUzp/aoY/rQyeZEyqmCmvKElsIbtOFaPlfs8R6KGexI6a/Na5r u3OPVwxxW6iJ6SNitzy6DUhprU/AJXPp4YjmXQMirNHQ36CA2k= 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: Wed, 7 Feb 2018 21:17:17 +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/gpu/drm/tegra/fb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/tegra/fb.c b/drivers/gpu/drm/tegra/fb.c index 001cb77e2f59..e63a0b228751 100644 --- a/drivers/gpu/drm/tegra/fb.c +++ b/drivers/gpu/drm/tegra/fb.c @@ -325,10 +325,8 @@ static struct tegra_fbdev *tegra_fbdev_create(struct drm_device *drm) struct tegra_fbdev *fbdev; fbdev = kzalloc(sizeof(*fbdev), GFP_KERNEL); - if (!fbdev) { - dev_err(drm->dev, "failed to allocate DRM fbdev\n"); + if (!fbdev) return ERR_PTR(-ENOMEM); - } drm_fb_helper_prepare(drm, &fbdev->base, &tegra_fb_helper_funcs);