Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1620719 > unrolled thread

[PATCH] gpu: host1x: Fix error handling

Started byChristophe JAILLET <christophe.jaillet@wanadoo.fr>
First post2017-04-10 22:30 +0200
Last post2017-04-11 10:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] gpu: host1x: Fix error handling Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2017-04-10 22:30 +0200
    Re: [PATCH] gpu: host1x: Fix error handling Mikko Perttunen <cyndis@kapsi.fi> - 2017-04-11 10:40 +0200

#1620719 — [PATCH] gpu: host1x: Fix error handling

FromChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Date2017-04-10 22:30 +0200
Subject[PATCH] gpu: host1x: Fix error handling
Message-ID<tuO6K-5Ei-23@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1621031

FromMikko Perttunen <cyndis@kapsi.fi>
Date2017-04-11 10:40 +0200
Message-ID<tuZvc-4yh-21@gated-at.bofh.it>
In reply to#1620719
On 10.04.2017 23:29, Christophe JAILLET wrote:
> 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;
>  	}
>

Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web