]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/bridge: ti-sn65dsi86: Use dev_err_probe() to avoid polluting the log
authorJavier Martinez Canillas <javierm@redhat.com>
Fri, 22 Jul 2022 07:47:55 +0000 (09:47 +0200)
committerJavier Martinez Canillas <javierm@redhat.com>
Fri, 22 Jul 2022 23:39:28 +0000 (01:39 +0200)
If devm_drm_of_get_bridge() can't find the connected bridge, it returns an
ERR_PTR(-EPROBE_DEFER) to indicate that the probe should be deferred.

But this path also prints an error message, which pollutes the kernel log
since is printed on every probe deferral, i.e:

  $ dmesg | grep "failed to create panel bridge" | wc -l
  38

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220722074755.660258-1-javierm@redhat.com
drivers/gpu/drm/bridge/ti-sn65dsi86.c

index 369bf72717f66e416327d67d8a0ac9ff383fec46..90bbabde159596761bdc704dc3d61ff419130a84 100644 (file)
@@ -1206,10 +1206,9 @@ static int ti_sn_bridge_probe(struct auxiliary_device *adev,
        int ret;
 
        pdata->next_bridge = devm_drm_of_get_bridge(pdata->dev, np, 1, 0);
-       if (IS_ERR(pdata->next_bridge)) {
-               DRM_ERROR("failed to create panel bridge\n");
-               return PTR_ERR(pdata->next_bridge);
-       }
+       if (IS_ERR(pdata->next_bridge))
+               return dev_err_probe(pdata->dev, PTR_ERR(pdata->next_bridge),
+                                    "failed to create panel bridge\n");
 
        ti_sn_bridge_parse_lanes(pdata, np);