Skip to content

Commit 9321f9d

Browse files
ben717-linuxUwe Kleine-König
authored andcommitted
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 17e40c2 ("pwm: New abstraction for PWM waveforms"). Signed-off-by: Ben Zong-You Xie <ben717@andestech.com> Link: https://patch.msgid.link/20260129-fix-pwm-ops-check-v1-1-6f0b7952c875@andestech.com Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
1 parent 75e7ed5 commit 9321f9d

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/pwm/core.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1699,8 +1699,7 @@ static bool pwm_ops_check(const struct pwm_chip *chip)
16991699

17001700
if (ops->write_waveform) {
17011701
if (!ops->round_waveform_tohw ||
1702-
!ops->round_waveform_fromhw ||
1703-
!ops->write_waveform)
1702+
!ops->round_waveform_fromhw)
17041703
return false;
17051704

17061705
if (PWM_WFHWSIZE < ops->sizeof_wfhw) {

0 commit comments

Comments
 (0)