Commit 9321f9d2 authored by Ben Zong-You Xie's avatar Ben Zong-You Xie Committed by Uwe Kleine-König
Browse files

pwm: Remove redundant check in pwm_ops_check()



ops->write_waveform is already known to be non-NULL so there is
no need to check it a second time.

The superflous check was introduced in commit 17e40c25
("pwm: New abstraction for PWM waveforms").

Signed-off-by: default avatarBen Zong-You Xie <ben717@andestech.com>
Link: https://patch.msgid.link/20260129-fix-pwm-ops-check-v1-1-6f0b7952c875@andestech.com


Signed-off-by: default avatarUwe Kleine-König <ukleinek@kernel.org>
parent 75e7ed52
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1699,8 +1699,7 @@ static bool pwm_ops_check(const struct pwm_chip *chip)

	if (ops->write_waveform) {
		if (!ops->round_waveform_tohw ||
		    !ops->round_waveform_fromhw ||
		    !ops->write_waveform)
		    !ops->round_waveform_fromhw)
			return false;

		if (PWM_WFHWSIZE < ops->sizeof_wfhw) {