mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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 <akhilesh@ee.iitb.ac.in> Tested-by: Mikko Perttunen <mperttunen@nvidia.com> Acked-by: Mikko Perttunen <mperttunen@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Link: https://lore.kernel.org/r/aKgKrCxUvP9Sw0YI@bhairav-test.ee.iitb.ac.in
This commit is contained in:
committed by
Thierry Reding
parent
fab823d82e
commit
b4505b6ad9
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user