Merge tag 's390-5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
[linux-2.6-microblaze.git] / drivers / platform / chrome / cros_ec_typec.c
index 4bd2752..7cb2e35 100644 (file)
@@ -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;
+
        typec->typec_cmd_supported = cros_ec_check_features(ec_dev, EC_FEATURE_TYPEC_CMD);
        typec->needs_mux_ack = cros_ec_check_features(ec_dev, EC_FEATURE_TYPEC_MUX_REQUIRE_AP_ACK);