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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170628092118.GA3354@lkp-wsm-ep1>
Date:   Wed, 28 Jun 2017 17:21:18 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Shaokun Zhang <zhangshaokun@...ilicon.com>
Cc:     kbuild-all@...org, mark.rutland@....com, will.deacon@....com,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux-doc@...r.kernel.org, linuxarm@...wei.com,
        Shaokun Zhang <zhangshaokun@...ilicon.com>,
        Anurup M <anurup.m@...wei.com>
Subject: [PATCH] drivers: perf: hisi: fix ptr_ret.cocci warnings

drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c:348:1-3: WARNING: PTR_ERR_OR_ZERO can be used


 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: 05958712d8d4 ("drivers: perf: hisi: Add support for HiSilicon SoC L3C PMU driver")
CC: Shaokun Zhang <zhangshaokun@...ilicon.com>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
---

 hisi_uncore_l3c_pmu.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c
+++ b/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c
@@ -345,10 +345,7 @@ static int hisi_l3c_pmu_init_data(struct
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	l3c_pmu->base = devm_ioremap_resource(dev, res);
-	if (IS_ERR(l3c_pmu->base))
-		return PTR_ERR(l3c_pmu->base);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(l3c_pmu->base);
 }
 
 static struct attribute *hisi_l3c_pmu_format_attr[] = {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ