Re:Re: [PATCH] iio: accel: kxcjk-1013: reject duplicate event disable

From: jiale yao

Date: Fri Sep 25 2026 - 10:52:40 EST


At 2026-09-25 22:17:19, "Andy Shevchenko" <andriy.shevchenko@xxxxxxxxx> wrote:
>On Fri, Sep 25, 2026 at 10:09:43PM +0800, Jiale Yao wrote:
>> The IIO core does not filter duplicate writes to the event enable
>> attribute. kxcjk1013_write_event_config() already ignores repeated
>> enable requests, but a repeated disable request still calls
>> kxcjk1013_set_power_state(data, false), dropping a runtime PM reference
>> that was not acquired for this request. This can underflow the runtime
>> PM usage count and trigger a "Runtime PM usage count underflow" warning.
>>
>> Return early when the requested state already matches ev_enable_state.
>
>Sounds like a bug that needs to be fixed and hence Fixes tag to be applied.
Sure, I'll add the Fixes tag in v2, 24h later, for any other comments before sending it.
>
>--
>With Best Regards,
>Andy Shevchenko
>