Re: [PATCH] power: supply: cros_peripheral_charger: unregister EC notifier

From: Sebastian Reichel

Date: Mon Jul 20 2026 - 17:43:59 EST



On Mon, 15 Jun 2026 14:31:05 +0800, Pengpeng Hou wrote:
> cros_pchg_probe() registers an EC event notifier whose callback uses the
> devm-allocated charger_data via container_of(). The driver has no
> remove callback and does not unregister the notifier, so the notifier
> chain can retain a pointer to freed driver state after unbind or probe
> cleanup.
>
> Register a devm cleanup action immediately after the notifier is
> installed so the notifier is unregistered before the driver state is
> released. Also fail probe if the notifier cannot be registered, instead
> of leaving a charger device that cannot receive EC events.
>
> [...]

Applied, thanks!

[1/1] power: supply: cros_peripheral_charger: unregister EC notifier
commit: c9386d5fabbe006c1f793b22bb80036303d1d166

Best regards,
--
Sebastian Reichel <sebastian.reichel@xxxxxxxxxxxxx>