Re: [PATCH v2] platform/chrome: wilco_ec: Fix device reference leak on open failure

From: Tzung-Bi Shih

Date: Thu Nov 05 2026 - 21:41:39 EST


On Thu, Nov 05, 2026 at 03:47:09PM +0800, Yige Jiang wrote:
> telem_open() takes a reference to dev_data->dev before allocating
> the session. If that allocation fails, it returns -ENOMEM without
> dropping the reference. Since release is not called after a failed
> open, the device data remains pinned after removal.
>
> Take the device reference only after the session allocation succeeds,
> so that a failed open does not leave an unbalanced reference. The
> successful open path remains balanced by telem_release().
>
> [...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git for-next

[1/1] platform/chrome: wilco_ec: Fix device reference leak on open failure
commit: 80436896141ecca950125dec3f320b7aacc5038a

Thanks!