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

* Re: [PATCH] gpu: host1x: Fix error handling
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Mikko Perttunen @ 2017-04-11  8:38 UTC (permalink / raw)
  To: Christophe JAILLET, thierry.reding
  Cc: dri-devel, linux-tegra, linux-kernel, kernel-janitors

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>

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

* Re: [PATCH] gpu: host1x: Fix error handling
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Thierry Reding @ 2017-06-15 12:07 UTC (permalink / raw)
  To: Christophe JAILLET; +Cc: dri-devel, linux-tegra, linux-kernel, kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 509 bytes --]

On Mon, Apr 10, 2017 at 10:29:22PM +0200, 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(-)

Applied to drm-misc-fixes, thanks.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[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