]> Git Repo - J-linux.git/commitdiff
drm: rcar-du: lvds: Use dev_err_probe()
authorLaurent Pinchart <[email protected]>
Thu, 15 Apr 2021 02:23:15 +0000 (05:23 +0300)
committerLaurent Pinchart <[email protected]>
Wed, 28 Jul 2021 13:33:32 +0000 (16:33 +0300)
Simplify error handling by using the dev_err_probe() function.

Signed-off-by: Laurent Pinchart <[email protected]>
Reviewed-by: Kieran Bingham <[email protected]>
drivers/gpu/drm/rcar-du/rcar_lvds.c

index 0804a2773e56f8471b9f38ccdb77df4a3377f3d2..d061b8de748fdd44fe71b3628ade5e8d1b8e1a13 100644 (file)
@@ -743,9 +743,8 @@ static struct clk *rcar_lvds_get_clock(struct rcar_lvds *lvds, const char *name,
        if (PTR_ERR(clk) == -ENOENT && optional)
                return NULL;
 
-       if (PTR_ERR(clk) != -EPROBE_DEFER)
-               dev_err(lvds->dev, "failed to get %s clock\n",
-                       name ? name : "module");
+       dev_err_probe(lvds->dev, PTR_ERR(clk), "failed to get %s clock\n",
+                     name ? name : "module");
 
        return clk;
 }
This page took 0.053859 seconds and 4 git commands to generate.