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-next>] [day] [month] [year] [list]
Message-Id: <20210908060200.7876-1-long870912@gmail.com>
Date:   Wed,  8 Sep 2021 14:02:00 +0800
From:   zhaoxiao <long870912@...il.com>
To:     thierry.reding@...il.com, lee.jones@...aro.org
Cc:     u.kleine-koenig@...gutronix.de, linux-pwm@...r.kernel.org,
        linux-kernel@...r.kernel.org, zhaoxiao <long870912@...il.com>
Subject: [PATCH] pwm: ab8500: Don't check the return code of pwmchip_remove()

pwmchip_remove() returns always 0. Don't use the value to make it
possible to eventually change the function to return void. Also the
driver core ignores the return value of ab8500_pwm_remove()
and considers the device removed anyhow. So returning early results
in a resource leak.

Signed-off-by: zhaoxiao <long870912@...il.com>
---
 drivers/pwm/pwm-ab8500.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/pwm/pwm-ab8500.c b/drivers/pwm/pwm-ab8500.c
index e2a26d9da25b..51132a076f7f 100644
--- a/drivers/pwm/pwm-ab8500.c
+++ b/drivers/pwm/pwm-ab8500.c
@@ -113,11 +113,8 @@ static int ab8500_pwm_probe(struct platform_device *pdev)
 static int ab8500_pwm_remove(struct platform_device *pdev)
 {
 	struct ab8500_pwm_chip *ab8500 = platform_get_drvdata(pdev);
-	int err;
 
-	err = pwmchip_remove(&ab8500->chip);
-	if (err < 0)
-		return err;
+	pwmchip_remove(&ab8500->chip);
 
 	dev_dbg(&pdev->dev, "pwm driver removed\n");
 
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ