Re: [PATCH] ASoC: codecs: wm8994: Fix runtime PM leak in wm8994_mic_detect()

From: Charles Keepax

Date: Fri Sep 18 2026 - 11:07:50 EST


On Thu, Sep 17, 2026 at 04:51:30PM +0000, Wentao Liang wrote:
> wm8994_mic_detect() resumes the component before configuring the MICBIAS
> pins, but the default case of the micbias switch returns -EINVAL right
> after taking that reference, skipping the pm_runtime_put() on the
> success path. This leaks a runtime PM reference on every call with an
> invalid micbias.
>
> Release the reference before returning -EINVAL.
>
> Fixes: f5a2cda4f1db ("ASoC: wm8994: Ensure the device is resumed in wm89xx_mic_detect functions")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Wentao Liang <vulab@xxxxxxxxxxx>
> ---

Reviewed-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx>

Thanks,
Charles