Re: [PATCH] platform/chrome: wilco_ec: Fix device reference leak on open failure
From: Tzung-Bi Shih
Date: Thu Nov 05 2026 - 00:28:00 EST
On Thu, Nov 05, 2026 at 12:47:12PM +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.
>
> Drop the reference on the allocation failure path, after restoring
Moving get_device() after kzalloc_obj() succeeds makes it cleaner.
> Assisted-by: LLM
The tag is no longer used; ./scripts/checkpatch.pl --strict:
WARNING: Non-standard signature: Assisted-by:
ERROR: Unrecognized email address: 'LLM'