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: <20240423161356.2522636-2-gnstark@salutedevices.com>
Date: Tue, 23 Apr 2024 19:13:55 +0300
From: George Stark <gnstark@...utedevices.com>
To: <u.kleine-koenig@...gutronix.de>, <neil.armstrong@...aro.org>,
	<khilman@...libre.com>, <jbrunet@...libre.com>,
	<martin.blumenstingl@...glemail.com>, <thierry.reding@...il.com>,
	<hkallweit1@...il.com>
CC: <linux-pwm@...r.kernel.org>, <linux-amlogic@...ts.infradead.org>,
	<linux-arm-kernel@...ts.infradead.org>, <linux-kernel@...r.kernel.org>,
	<kernel@...utedevices.com>, George Stark <gnstark@...utedevices.com>, Dmitry
 Rokosov <ddrokosov@...utedevices.com>
Subject: [PATCH 1/2] pwm: meson: drop unneeded check in get_state callback

Drop checking state argument for null pointer in meson_pwm_get_state()
due to it is called only from pwm core with always valid arguments.

Fixes: 211ed630753d ("pwm: Add support for Meson PWM Controller")
Signed-off-by: George Stark <gnstark@...utedevices.com>
Signed-off-by: Dmitry Rokosov <ddrokosov@...utedevices.com>
---
 drivers/pwm/pwm-meson.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
index 529a541ba7b6..ebe76298f6e2 100644
--- a/drivers/pwm/pwm-meson.c
+++ b/drivers/pwm/pwm-meson.c
@@ -311,9 +311,6 @@ static int meson_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm,
 	struct meson_pwm_channel *channel;
 	u32 value;
 
-	if (!state)
-		return 0;
-
 	channel = &meson->channels[pwm->hwpwm];
 	channel_data = &meson_pwm_per_channel_data[pwm->hwpwm];
 
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ