[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yk4DGZfpYbK8dofL@chromium.org>
Date: Wed, 6 Apr 2022 21:16:09 +0000
From: Prashant Malani <pmalani@...omium.org>
To: Akihiko Odaki <akihiko.odaki@...il.com>
Cc: linux-kernel@...r.kernel.org, chrome-platform@...ts.linux.dev,
Benson Leung <bleung@...omium.org>,
Guenter Roeck <groeck@...omium.org>
Subject: Re: [PATCH] platform/chrome: cros_ec_typec: Check for EC driver
Hi Akihiko,
Thanks for the patch.
On Apr 04 13:11, Akihiko Odaki wrote:
> The EC driver may not be initialized when cros_typec_probe is called,
> particulary when CONFIG_CROS_EC_CHARDEV=m.
>
> Signed-off-by: Akihiko Odaki <akihiko.odaki@...il.com>
> ---
> drivers/platform/chrome/cros_ec_typec.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c
> index 4bd2752c0823..7cb2e35c4ded 100644
> --- a/drivers/platform/chrome/cros_ec_typec.c
> +++ b/drivers/platform/chrome/cros_ec_typec.c
> @@ -1084,6 +1084,9 @@ static int cros_typec_probe(struct platform_device *pdev)
> }
>
> ec_dev = dev_get_drvdata(&typec->ec->ec->dev);
> + if (!ec_dev)
> + return -EPROBE_DEFER;
> +
Just a quick check: are you still seeing this issue with 5.18-rc1, which
contains a null check for the parent EC device [1] ?
Thanks,
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/platform/chrome?id=ffebd90532728086007038986900426544e3df4e
Powered by blists - more mailing lists