Re: [PATCH] platform/chrome: cros_ec_typec: Check ec platform device pointer
From: Tzung-Bi Shih
Date: Tue Jul 22 2025 - 23:24:59 EST
On Tue, Jul 22, 2025 at 03:28:26PM +0200, Tomasz Michalec wrote:
> It is possible that parent device for cros_ec_typec device is already
> available, but ec pointer in parent driver data isn't populated yet. It
> may happen when cros_typec_probe is running in parallel with
> cros_ec_register. This leads to NULL pointer dereference when
> cros_typec_probe tries to get driver data from typec->ec->ec->dev.
>
> Check if typec->ec->ec is set before using it in cros_typec_probe.
>
> [...]
Please use at least for-next branch as the commit base next time. I have
fixed it this time.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git for-next
[1/1] platform/chrome: cros_ec_typec: Check ec platform device pointer
commit: 731a4702b668ef28730e7d2414672b7085e757d6
Thanks!