Received: by 10.223.176.46 with SMTP id f43csp3204wra; Fri, 19 Jan 2018 12:52:22 -0800 (PST) X-Google-Smtp-Source: ACJfBotUmTQhzR858sCyXneRqAmysZQ2IqAcXBadjS60G233M+JfCscFErmy8b/hGo5J/luAL7QM X-Received: by 2002:a17:902:8a89:: with SMTP id p9-v6mr2155727plo.397.1516395141884; Fri, 19 Jan 2018 12:52:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516395141; cv=none; d=google.com; s=arc-20160816; b=Sb+TLQciLTsC1SzyhaRJeBa1DauMXxdULBPxyKp/VB/ueOK6Q7VVTD3idsAURCsdSi Pnr4YN8m0/Ka9HqvHg4FbDua1XlDDNk5Gx0kDzus5QtfRHTCYxPsdNqnVvHqaSniCsDe TqZn8PvPwZiophbpYqmRGqgmNcJUGHkZLgUuS2zkML1t8YuBdxE67wmNiUPZ+lvJraNc PWhj6j66AFFuFfInUPbkwztmWpGCwsjAFaVEF+5QWdAjZzE9SJKEleFbIRJK8PLxjPWH kQfdm4DC4Z9CWNQbMtpyw3t68Yipc9EUQ8t7j0qihdavbF1H92Wgfa24biNTg37rM487 UdSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:subject :from:cc:to:arc-authentication-results; bh=LGEBRXx18syIpBEhQ7Bo2w0tPaTd61wpuHsyFbzmtNs=; b=FxOmiPZSKtI2GT9WtFjSSMgQA4JtZw4/HF886pAeZi3EThORCejx6GxSoiU3e01pPb ZCfkS5SdZQOqdzjf5ChxN6RerHY0MGRmpVwj0sv/ufLWao1XaK5asu2FJfvFyzt/TjUh lP2oZGr531zKPJRSHjCDhU5GA9BFlOv5Bt2K/LAD9Nt8WIuh6gkg6RDfCR0YHnyeNJsb crQQoS4rLDWAQoCmpPhjjQbInMk1NZeSAyuaf9sePdjDPIE2yk4t2dh5QoaFf6WPchd9 SdHs9KAgTe8SVwBTxIu052N8qejaDtB6gjUOMdTh7yTaXtZnGLrOkiz+QeKeqVkTsrqy m/QA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u8si3340474pgq.203.2018.01.19.12.52.07; Fri, 19 Jan 2018 12:52:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751466AbeASUvN (ORCPT + 99 others); Fri, 19 Jan 2018 15:51:13 -0500 Received: from mout.web.de ([212.227.17.12]:64050 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755132AbeASUvI (ORCPT ); Fri, 19 Jan 2018 15:51:08 -0500 Received: from [192.168.1.3] ([78.53.251.71]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MHp4r-1egD404BCP-003aJN; Fri, 19 Jan 2018 21:50:58 +0100 To: iommu@lists.linux-foundation.org, linux-tegra@vger.kernel.org, Hiroshi Doyu , =?UTF-8?B?SsO2cmcgUsO2ZGVs?= , Jonathan Hunter , Thierry Reding Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Subject: [PATCH] IOMMU-Tegra: gart: Delete two error messages for a failed memory allocation in tegra_gart_probe() Message-ID: Date: Fri, 19 Jan 2018 21:50:56 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:Qv3pV+53prj/ZELF7VVM4/jPE3NN43IM3US/rHHybakQnyMdCHB 0IYjngE+1B3bQLx1SRFvm6i4lq7XDyQXWuie237STX/3SYSFxqd32NuZt+alKAUT9MnBgAI nOEI6sizKTEDPgXsyjqXQIoXZIjv6dOE5krcFAtOadAQt6Y+17W2wn98Jjso3JF74rRPI2g cWgrCeoUTEwGkfovVYT+Q== X-UI-Out-Filterresults: notjunk:1;V01:K0:6TZ/1sG1Xbo=:upWls25qAXirwzX8mPC9X3 nSol1gZfEien3KsQOd+v8jQp4+8iQrAIGdgWDxdvVclVZbKMbaym0DmtHkKEN4vVlf//xHrSt jmffk580uWJkl1uSl5RNF0gWCpy5fYZdjEm0Exg16S+G/mXY/st6pP9PFRiu8hW0RxkMDiy5H T9bfxN4oI1a8XIpOZrcC7xRMxGuuHzzEIjJt7CVjTaYklu4RrHrBuxN3fBzEYm4KKQehfUm1h wqUuJOaa4lOISj+Am+FcRhgGMg62vrWPgTqdpsWx7pK1OX0CZgrdkLgoE8ClUq+e6RPVZlXeq RXYhkgPjusSVsPiiNdNsozcaZ3oHsZ4IRBTf8qgUijGkAPiuIas4asQsjtsnrD4bUxtmvl3F/ N8djQb8aLeHId6jvtWdzHhtYvQORvrHe32lv9ZZ0rFu6k7DuTzTz4b+M+SccaARkelCIbVMSx 7VAJyebkWvwman9xKoYUlaC4Lq7t0OBM6tTt+M4V2fiweLUrz0W1ZO2tiHEoJcjLfIL52bd1o FZTxIa/+lQMnqr2O58WDIs9JIdZoIJO44uhU8c2wSoJrBynFXtJBdhTc56+mjXjOr+T0dwDoe tdrTlb28Cd8lXq/32ztHrqGoykL8eNjVaBpDTN/VxaWMX4TivgcokWuV9GWUKXdJMVFFh4+Hq OAHTS8lIs6f2nMAIjOVQNMibCXs0v1Nf+qbcgV1yhr1jhamwmX7Bmpg2o/ll0EnPhopGU19n8 L5ywGA/+HfHLG+NTLynbEfu4sj1prjKGEp45IqVklSaZWUZVHpBNqHXxAYcP0RiYu4SiRw04E fhAafxupr6KqLb/Gh5YfFeR1uAwoJMUUb00lXBZeFvdN/3LL6Y= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Markus Elfring Date: Fri, 19 Jan 2018 21:44:31 +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/iommu/tegra-gart.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/iommu/tegra-gart.c b/drivers/iommu/tegra-gart.c index b62f790ad1ba..1fee3a956832 100644 --- a/drivers/iommu/tegra-gart.c +++ b/drivers/iommu/tegra-gart.c @@ -419,10 +419,8 @@ static int tegra_gart_probe(struct platform_device *pdev) } gart = devm_kzalloc(dev, sizeof(*gart), GFP_KERNEL); - if (!gart) { - dev_err(dev, "failed to allocate gart_device\n"); + if (!gart) return -ENOMEM; - } gart_regs = devm_ioremap(dev, res->start, resource_size(res)); if (!gart_regs) { @@ -455,10 +453,8 @@ static int tegra_gart_probe(struct platform_device *pdev) gart->page_count = (resource_size(res_remap) >> GART_PAGE_SHIFT); gart->savedata = vmalloc(sizeof(u32) * gart->page_count); - if (!gart->savedata) { - dev_err(dev, "failed to allocate context save area\n"); + if (!gart->savedata) return -ENOMEM; - } platform_set_drvdata(pdev, gart); do_gart_setup(gart, NULL); -- 2.15.1