]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/bridge: anx6345: don't print error message if regulator is not ready
authorVasily Khoruzhick <anarsoul@gmail.com>
Wed, 26 Feb 2020 08:10:07 +0000 (00:10 -0800)
committerMaxime Ripard <maxime@cerno.tech>
Thu, 27 Feb 2020 12:49:27 +0000 (13:49 +0100)
We don't want to print scary message if devm_regulator_get() returns
-EPROBE_DEFER

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20200226081011.1347245-3-anarsoul@gmail.com
drivers/gpu/drm/bridge/analogix/analogix-anx6345.c

index 5139c3724890e7e9595c7ba6eb12ed37a95e73ca..3ec34cf6fdadcc3e9e6211fff9aaa275801a8b0b 100644 (file)
@@ -720,14 +720,18 @@ static int anx6345_i2c_probe(struct i2c_client *client,
        /* 1.2V digital core power regulator  */
        anx6345->dvdd12 = devm_regulator_get(dev, "dvdd12");
        if (IS_ERR(anx6345->dvdd12)) {
-               DRM_ERROR("dvdd12-supply not found\n");
+               if (PTR_ERR(anx6345->dvdd12) != -EPROBE_DEFER)
+                       DRM_ERROR("Failed to get dvdd12 supply (%ld)\n",
+                                 PTR_ERR(anx6345->dvdd12));
                return PTR_ERR(anx6345->dvdd12);
        }
 
        /* 2.5V digital core power regulator  */
        anx6345->dvdd25 = devm_regulator_get(dev, "dvdd25");
        if (IS_ERR(anx6345->dvdd25)) {
-               DRM_ERROR("dvdd25-supply not found\n");
+               if (PTR_ERR(anx6345->dvdd25) != -EPROBE_DEFER)
+                       DRM_ERROR("Failed to get dvdd25 supply (%ld)\n",
+                                 PTR_ERR(anx6345->dvdd25));
                return PTR_ERR(anx6345->dvdd25);
        }