drm: rcar-du: lvds: Use dev_err_probe()

Simplify error handling by using the dev_err_probe() function.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
This commit is contained in:
Laurent Pinchart 2021-04-15 05:23:15 +03:00
parent 9b54182ce2
commit 6571a76af3

View 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;
}