From: Akhilesh Patil Date: Fri, 22 Aug 2025 06:14:04 +0000 (+0530) Subject: gpu: host1x: Use dev_err_probe() in probe path X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b4505b6ad9444c8c517240c74f8b9cbbba94a86b;p=thirdparty%2Fkernel%2Flinux.git gpu: host1x: Use dev_err_probe() in probe path 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 Tested-by: Mikko Perttunen Acked-by: Mikko Perttunen Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/aKgKrCxUvP9Sw0YI@bhairav-test.ee.iitb.ac.in --- diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c index e1a9246d35f4b..e365df6af353b 100644 --- a/drivers/gpu/host1x/dev.c +++ b/drivers/gpu/host1x/dev.c @@ -585,14 +585,8 @@ 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; - } + if (IS_ERR(host->clk)) + return dev_err_probe(&pdev->dev, PTR_ERR(host->clk), "failed to get clock\n"); err = host1x_get_resets(host); if (err)