[PATCH 6.12 064/163] pwm: Fix invalid state detection