lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <faa84bc9-d663-f0ea-4f62-40b853c0212b@users.sourceforge.net>
Date:   Fri, 19 Jan 2018 21:50:56 +0100
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     iommu@...ts.linux-foundation.org, linux-tegra@...r.kernel.org,
        Hiroshi Doyu <hdoyu@...dia.com>,
        Jörg Rödel <joro@...tes.org>,
        Jonathan Hunter <jonathanh@...dia.com>,
        Thierry Reding <thierry.reding@...il.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: [PATCH] IOMMU-Tegra: gart: Delete two error messages for a failed
 memory allocation in tegra_gart_probe()

From: Markus Elfring <elfring@...rs.sourceforge.net>
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 <elfring@...rs.sourceforge.net>
---
 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ