Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Ben Zong-You Xie and committed by
Uwe Kleine-König
9321f9d2 75e7ed52

+1 -2
+1 -2
drivers/pwm/core.c
··· 1699 1699 1700 1700 if (ops->write_waveform) { 1701 1701 if (!ops->round_waveform_tohw || 1702 - !ops->round_waveform_fromhw || 1703 - !ops->write_waveform) 1702 + !ops->round_waveform_fromhw) 1704 1703 return false; 1705 1704 1706 1705 if (PWM_WFHWSIZE < ops->sizeof_wfhw) {