diff options
| author | Ben Zong-You Xie <ben717@andestech.com> | 2026-01-29 09:43:34 +0300 |
|---|---|---|
| committer | Uwe Kleine-König <ukleinek@kernel.org> | 2026-01-30 13:04:44 +0300 |
| commit | 9321f9d27fbaf6c4f32772fc2620961a0c492135 (patch) | |
| tree | 5fdfc5bc9763538de7343dbe906928539e5d12f9 | |
| parent | 75e7ed52ac7c1da90f304dcda2906636404df921 (diff) | |
| download | linux-9321f9d27fbaf6c4f32772fc2620961a0c492135.tar.xz | |
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 17e40c25158f
("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>
| -rw-r--r-- | drivers/pwm/core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c index 41fd3a9b2883..8da78b4b21b9 100644 --- a/drivers/pwm/core.c +++ b/drivers/pwm/core.c @@ -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) { |
