Re: [PATCH -next] gpu: host1x: Fix wrong pointer passed to PTR_ERR()

2017-04-24 Thread Jon Hunter

On 16/04/17 05:08, Wei Yongjun wrote:
> From: Wei Yongjun 
> 
> PTR_ERR should access the value just tested by IS_ERR, otherwise
> the wrong error code will be returned.
> 
> Fixes: b386c6b73ac6 ("gpu: host1x: Support module reset")
> Signed-off-by: Wei Yongjun 
> ---
>  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 f05ebb1..ac65f52 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(>dev, "host1x");
>   if (IS_ERR(host->rst)) {
> - err = PTR_ERR(host->clk);
> + err = PTR_ERR(host->rst);
>   dev_err(>dev, "failed to get reset: %d\n", err);
>   return err;
>   }

Thanks. However, we have already received a fix for this [0].

Cheers
Jon

[0] https://patchwork.kernel.org/patch/9674417/

-- 
nvpublic
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH -next] gpu: host1x: Fix wrong pointer passed to PTR_ERR()

2017-04-16 Thread Wei Yongjun
From: Wei Yongjun 

PTR_ERR should access the value just tested by IS_ERR, otherwise
the wrong error code will be returned.

Fixes: b386c6b73ac6 ("gpu: host1x: Support module reset")
Signed-off-by: Wei Yongjun 
---
 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 f05ebb1..ac65f52 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(>dev, "host1x");
if (IS_ERR(host->rst)) {
-   err = PTR_ERR(host->clk);
+   err = PTR_ERR(host->rst);
dev_err(>dev, "failed to get reset: %d\n", err);
return err;
}

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel