Re: [PATCH] platform/chrome: cros_ec_typec: Check for EC device

From: Tzung-Bi Shih
Date: Tue Jan 25 2022 - 22:46:44 EST


On Wed, Jan 26, 2022 at 01:22:03AM +0000, Prashant Malani wrote:
> Fixes: fdc6b21e2444 ("platform/chrome: Add Type C connector class driver")
> Reported-by: Alyssa Ross <hi@xxxxxxxxx>
> Signed-off-by: Prashant Malani <pmalani@xxxxxxxxxxxx>

With a minor comment,
Reviewed-by: Tzung-Bi Shih <tzungbi@xxxxxxxxxx>

> @@ -1076,6 +1076,12 @@ static int cros_typec_probe(struct platform_device *pdev)
>
> typec->dev = dev;
> typec->ec = dev_get_drvdata(pdev->dev.parent);
> +

I would prefer to remove the blank line to make it look like an integrated block.

> + if (!typec->ec) {
> + dev_err(dev, "couldn't find parent EC device\n");
> + return -ENODEV;
> + }
> +