drm/panfrost: devfreq: Don't display error for EPROBE_DEFER
authorChris Morgan <macromorgan@hotmail.com>
Wed, 21 Jul 2021 21:48:30 +0000 (16:48 -0500)
committerSteven Price <steven.price@arm.com>
Fri, 23 Jul 2021 11:06:29 +0000 (12:06 +0100)
Set a condition for the message of "Couldn't set OPP regulators" to not
display if the error code is EPROBE_DEFER. Note that I used an if
statement to capture the condition instead of the dev_err_probe
function because I didn't want to change the DRM_DEV_ERROR usage.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210721214830.25690-1-macroalpha82@gmail.com
drivers/gpu/drm/panfrost/panfrost_devfreq.c

index 3644652f726f7710abb934b95b9bfce942b6731a..194af7f607a6ed5308c6972229496d0f3d63a014 100644 (file)
@@ -106,7 +106,8 @@ int panfrost_devfreq_init(struct panfrost_device *pfdev)
        if (ret) {
                /* Continue if the optional regulator is missing */
                if (ret != -ENODEV) {
-                       DRM_DEV_ERROR(dev, "Couldn't set OPP regulators\n");
+                       if (ret != -EPROBE_DEFER)
+                               DRM_DEV_ERROR(dev, "Couldn't set OPP regulators\n");
                        return ret;
                }
        }