Commit 59e04bc2 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Thierry Reding

gpu: host1x: Fix error handling

If 'devm_reset_control_get' returns an error, then we erroneously return
success because error code is taken from 'host->clk' instead of

Fixes: b386c6b7 ("gpu: host1x: Support module reset")
Signed-off-by: default avatarChristophe JAILLET <>
Reviewed-by: default avatarMikko Perttunen <>
Signed-off-by: default avatarThierry Reding <>
parent d758619b
...@@ -172,7 +172,7 @@ static int host1x_probe(struct platform_device *pdev) ...@@ -172,7 +172,7 @@ static int host1x_probe(struct platform_device *pdev)
host->rst = devm_reset_control_get(&pdev->dev, "host1x"); host->rst = devm_reset_control_get(&pdev->dev, "host1x");
if (IS_ERR(host->rst)) { if (IS_ERR(host->rst)) {
err = PTR_ERR(host->clk); err = PTR_ERR(host->rst);
dev_err(&pdev->dev, "failed to get reset: %d\n", err); dev_err(&pdev->dev, "failed to get reset: %d\n", err);
return err; return err;
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment