public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpu: host1x: Fix error handling
@ 2017-04-10 20:29 Christophe JAILLET
  2017-04-11  8:38 ` Mikko Perttunen
  2017-06-15 12:07 ` Thierry Reding
  0 siblings, 2 replies; 3+ messages in thread
From: Christophe JAILLET @ 2017-04-10 20:29 UTC (permalink / raw)
  To: thierry.reding
  Cc: dri-devel, linux-tegra, linux-kernel, kernel-janitors,
	Christophe JAILLET

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

Fixes: b386c6b73ac6 ("gpu: host1x: Support module reset")

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/gpu/host1x/dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c
index f05ebb14fa63..ac65f52850a6 100644
--- a/drivers/gpu/host1x/dev.c
+++ b/drivers/gpu/host1x/dev.c
@@ -172,7 +172,7 @@ static int host1x_probe(struct platform_device *pdev)
 
 	host->rst = devm_reset_control_get(&pdev->dev, "host1x");
 	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);
 		return err;
 	}
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-06-15 12:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-10 20:29 [PATCH] gpu: host1x: Fix error handling Christophe JAILLET
2017-04-11  8:38 ` Mikko Perttunen
2017-06-15 12:07 ` Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox