Use dev_err_probe() helper as recommended by core driver model in
drivers/base/core.c to handle deferred probe error. Improve code
consistency and debuggability using standard helper.

Signed-off-by: Akhilesh Patil <[email protected]>
---
 drivers/gpu/host1x/dev.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c
index 1f93e5e276c0..e6f3cbeb9ae5 100644
--- a/drivers/gpu/host1x/dev.c
+++ b/drivers/gpu/host1x/dev.c
@@ -587,11 +587,7 @@ static int host1x_probe(struct platform_device *pdev)
        host->clk = devm_clk_get(&pdev->dev, NULL);
        if (IS_ERR(host->clk)) {
                err = PTR_ERR(host->clk);
-
-               if (err != -EPROBE_DEFER)
-                       dev_err(&pdev->dev, "failed to get clock: %d\n", err);
-
-               return err;
+               return dev_err_probe(&pdev->dev, err, "failed to get clock: 
%d\n", err);
        }
 
        err = host1x_get_resets(host);
-- 
2.34.1

Reply via email to