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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180504201606.GA22737@lkp-wsm-ep1>
Date:   Sat, 5 May 2018 04:16:06 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Akshu Agrawal <akshu.agrawal@....com>
Cc:     kbuild-all@...org, djkurtz@...omium.org, akshu.agrawal@....com,
        Alexander.Deucher@....com, "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Len Brown <lenb@...nel.org>,
        "open list:ACPI" <linux-acpi@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: [PATCH] ACPI: APD: fix ptr_ret.cocci warnings

From: Fengguang Wu <fengguang.wu@...el.com>

drivers/acpi/acpi_apd.c:114: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: 451cec30ec2b ("ACPI: APD: Add AMD misc clock handler support")
CC: Akshu Agrawal <akshu.agrawal@....com>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
---

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

--- a/drivers/acpi/acpi_apd.c
+++ b/drivers/acpi/acpi_apd.c
@@ -111,10 +111,7 @@ static int st_misc_setup(struct apd_priv
 	clkdev = platform_device_register_data(&adev->dev, "clk-st",
 					       PLATFORM_DEVID_NONE, clk_data,
 					       sizeof(*clk_data));
-	if (IS_ERR(clkdev))
-		return PTR_ERR(clkdev);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(clkdev);
 }
 
 static const struct apd_device_desc cz_i2c_desc = {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ