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: <20240318151631.1621881-3-d-gole@ti.com>
Date: Mon, 18 Mar 2024 20:46:33 +0530
From: Dhruva Gole <d-gole@...com>
To: "Rafael J . Wysocki" <rafael@...nel.org>
CC: Tony Lindgren <tony@...mide.com>, Len Brown <len.brown@...el.com>,
        Pavel
 Machek <pavel@....cz>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Viresh Kumar <viresh.kumar@...aro.org>, <theo.lebrun@...tlin.com>,
        Dhruva
 Gole <d-gole@...com>, <linux-pm@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <linux-mmc@...r.kernel.org>
Subject: [PATCH V2 2/2] PM: wakeup: Remove unnecessary else from device_init_wakeup

Checkpatch warns that else is generally not necessary after a return
condition which exists in the if part of this function. Hence, just to
abide by what checkpatch recommends, follow it's guidelines.

Signed-off-by: Dhruva Gole <d-gole@...com>
---
 include/linux/pm_wakeup.h | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/include/linux/pm_wakeup.h b/include/linux/pm_wakeup.h
index 428803eed798..76cd1f9f1365 100644
--- a/include/linux/pm_wakeup.h
+++ b/include/linux/pm_wakeup.h
@@ -234,11 +234,10 @@ static inline int device_init_wakeup(struct device *dev, bool enable)
 	if (enable) {
 		device_set_wakeup_capable(dev, true);
 		return device_wakeup_enable(dev);
-	} else {
-		device_wakeup_disable(dev);
-		device_set_wakeup_capable(dev, false);
-		return 0;
 	}
+	device_wakeup_disable(dev);
+	device_set_wakeup_capable(dev, false);
+	return 0;
 }
 
 #endif /* _LINUX_PM_WAKEUP_H */
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ