From patchwork Thu Feb 8 14:37:28 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: 10207225 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 09859602D8 for ; Thu, 8 Feb 2018 14:37:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D40661FFDA for ; Thu, 8 Feb 2018 14:37:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C806929465; Thu, 8 Feb 2018 14:37:35 +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 DA1A31FFDA for ; Thu, 8 Feb 2018 14:37:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0944B6E639; Thu, 8 Feb 2018 14:37:34 +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 B356F6E639 for ; Thu, 8 Feb 2018 14:37:31 +0000 (UTC) Received: from [192.168.1.2] ([78.49.237.151]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LeLWP-1f2tzJ3y7p-00qBhE; Thu, 08 Feb 2018 15:37:29 +0100 Subject: [PATCH 1/3] drm/gma500: Delete an error message for a failed memory allocation in two functions From: SF Markus Elfring To: dri-devel@lists.freedesktop.org, David Airlie , Patrik Jakobsson References: <079c31b2-a2e6-cf42-cecb-e1e10dd241f6@users.sourceforge.net> Message-ID: Date: Thu, 8 Feb 2018 15:37:28 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <079c31b2-a2e6-cf42-cecb-e1e10dd241f6@users.sourceforge.net> Content-Language: en-US X-Provags-ID: V03:K0:tMPIpSimiiYGh3g4fpx1qUbYslFUY3dh2neUCy/q5jARz5FJrep bALwgBy4gDSywyPhwExxmJwCNJEEJ0Ns15hKFxwdyyTJsvLFPFPexUzYi9TW7uQuwwCjjto ZsXB+zRf5/rESwCdIqWLQ131PvsiFrdfNS3dYrRq6G2D7CwI9WDNrTEgrsM/C5bSO9AWVwx 02ulmc/x4yhUjXksLOATA== X-UI-Out-Filterresults: notjunk:1; V01:K0:jLYy8XabJr0=:UOs/P3I1IukTyQ8SnYwd0T qHM4b8/aqbJ9XuSytlYWNxbT6pAWSmuGUo6CStR5Um8Z1wdEiwtVuOmKh/ordcZiER8mwqw6p +2lUcHhYiRGldtvBycMUq8hxE5nJkI9AEpVfM8bjsU3XqfZepDpMH8mhPrNXGRgCG4yG+tTWf zHhZ8VN21tanTKcrP5g3+PORIsEyaN7To7qWJdC3fhXzGA8dtZUttWF8U5WiFi0wyZoKstq7X +6wIQLGHiGc7XjFlInaCxep7fnGZnjWjllydxhmhvnxe8Yexk03jxTJe81s7vjT/9n7+H5kjQ nhM9pAEW4H44VIehvgCtztMpZa1eG9fdpORylVqxJm9sG82uVeq2Wi8tdwdwVhf6mGqT+toMw YwOY456wGFyjFFhxLNCewYPMyJGwTn5LwXxF7j2Ssv5GhDRngkOuGzqo20UhsS5VkoACarDDP tiGWo5r1sfpj8yIAN+hYrhSpx8MZCbFzVieaPVgwSnprmPgqdNGy9gHrcijd11UA9MvROZXlw gq45Fluy9MP+0+2Hvtf+FymLp0Q7oPM7nQhYhpvGVA+ofFiFPHzZ+qLoNmgXlTdOdrDMlUAMW nrSBMEiglxs7if4fbW9gWPrxrUbNUpgkkJgTjQUe43gWuz3Bg+VCiIuP/UQfd6BOnUwD8yAJ2 qbeHUA6TIc9jokJw7jv9KVN7o04Vo0yN3i6qns3TOm/RF4uu2H+/gWp3PRjm5Z4Y3yDCgbvW3 Rm3nH3myMmqVEj33WfcBXzI5iK1woKUJV6aBVQKzxqpPuX8oi4RQyRl0jzx3AlrE1+Sck1TKl G00ploBMpQ4x/hGzSiWwDfzMWp54gHeN1JPp84+cHysCCRO7Gs= 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 14:55:49 +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/gma500/framebuffer.c | 4 +--- drivers/gpu/drm/gma500/oaktrail_hdmi.c | 5 +---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c index cb0a2ae916e0..3ff320f3ff47 100644 --- a/drivers/gpu/drm/gma500/framebuffer.c +++ b/drivers/gpu/drm/gma500/framebuffer.c @@ -530,10 +530,8 @@ int psb_fbdev_init(struct drm_device *dev) int ret; fbdev = kzalloc(sizeof(struct psb_fbdev), GFP_KERNEL); - if (!fbdev) { - dev_err(dev->dev, "no memory\n"); + if (!fbdev) return -ENOMEM; - } dev_priv->fbdev = fbdev; diff --git a/drivers/gpu/drm/gma500/oaktrail_hdmi.c b/drivers/gpu/drm/gma500/oaktrail_hdmi.c index 8b2eb32ee988..d9a6d54b6641 100644 --- a/drivers/gpu/drm/gma500/oaktrail_hdmi.c +++ b/drivers/gpu/drm/gma500/oaktrail_hdmi.c @@ -690,11 +690,8 @@ void oaktrail_hdmi_setup(struct drm_device *dev) return; hdmi_dev = kzalloc(sizeof(struct oaktrail_hdmi_dev), GFP_KERNEL); - if (!hdmi_dev) { - dev_err(dev->dev, "failed to allocate memory\n"); + if (!hdmi_dev) goto out; - } - ret = pci_enable_device(pdev); if (ret) {