From: Ben Zong-You Xie Date: Thu, 29 Jan 2026 06:43:34 +0000 (+0800) Subject: pwm: Remove redundant check in pwm_ops_check() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9321f9d27fbaf6c4f32772fc2620961a0c492135;p=thirdparty%2Fkernel%2Flinux.git 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 Link: https://patch.msgid.link/20260129-fix-pwm-ops-check-v1-1-6f0b7952c875@andestech.com Signed-off-by: Uwe Kleine-König --- diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c index 41fd3a9b28837..8da78b4b21b97 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) {