usb: typec: tcpm: fusb302: Do not log an error on -EPROBE_DEFER
authorHans de Goede <hdegoede@redhat.com>
Sun, 25 Feb 2018 15:20:01 +0000 (16:20 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Mar 2018 19:19:22 +0000 (11:19 -0800)
Do not log an error if tcpm_register_port() fails with -EPROBE_DEFER.

Fixes: cf140a356971 ("typec: fusb302: Use dev_err during probe")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/fusb302/fusb302.c

index 9ce4756..dcd8ef0 100644 (file)
@@ -1857,7 +1857,8 @@ static int fusb302_probe(struct i2c_client *client,
        chip->tcpm_port = tcpm_register_port(&client->dev, &chip->tcpc_dev);
        if (IS_ERR(chip->tcpm_port)) {
                ret = PTR_ERR(chip->tcpm_port);
-               dev_err(dev, "cannot register tcpm port, ret=%d", ret);
+               if (ret != -EPROBE_DEFER)
+                       dev_err(dev, "cannot register tcpm port, ret=%d", ret);
                goto destroy_workqueue;
        }