linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] drm/panfrost: Fix missing clk_disable_unprepare() on error in panfrost_clk_init()
@ 2021-06-08 14:38 Wei Yongjun
  2021-06-11 10:32 ` Steven Price
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2021-06-08 14:38 UTC (permalink / raw)
  To: weiyongjun1, Clément Péron, Rob Herring, Tomeu Vizoso,
	David Airlie, Daniel Vetter, Philipp Zabel
  Cc: dri-devel, linux-kernel, kernel-janitors, Hulk Robot

Fix the missing clk_disable_unprepare() before return
from panfrost_clk_init() in the error handling case.

Fixes: b681af0bc1cc ("drm: panfrost: add optional bus_clock")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/gpu/drm/panfrost/panfrost_device.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm/panfrost/panfrost_device.c
index 125ed973feaa..a2a09c51eed7 100644
--- a/drivers/gpu/drm/panfrost/panfrost_device.c
+++ b/drivers/gpu/drm/panfrost/panfrost_device.c
@@ -54,7 +54,8 @@ static int panfrost_clk_init(struct panfrost_device *pfdev)
 	if (IS_ERR(pfdev->bus_clock)) {
 		dev_err(pfdev->dev, "get bus_clock failed %ld\n",
 			PTR_ERR(pfdev->bus_clock));
-		return PTR_ERR(pfdev->bus_clock);
+		err = PTR_ERR(pfdev->bus_clock);
+		goto disable_clock;
 	}
 
 	if (pfdev->bus_clock) {


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

* Re: [PATCH -next] drm/panfrost: Fix missing clk_disable_unprepare() on error in panfrost_clk_init()
  2021-06-08 14:38 [PATCH -next] drm/panfrost: Fix missing clk_disable_unprepare() on error in panfrost_clk_init() Wei Yongjun
@ 2021-06-11 10:32 ` Steven Price
  0 siblings, 0 replies; 2+ messages in thread
From: Steven Price @ 2021-06-11 10:32 UTC (permalink / raw)
  To: Wei Yongjun, Clément Péron, Rob Herring, Tomeu Vizoso,
	David Airlie, Daniel Vetter, Philipp Zabel
  Cc: Hulk Robot, kernel-janitors, linux-kernel, dri-devel

On 08/06/2021 15:38, Wei Yongjun wrote:
> Fix the missing clk_disable_unprepare() before return
> from panfrost_clk_init() in the error handling case.
> 
> Fixes: b681af0bc1cc ("drm: panfrost: add optional bus_clock")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Reviewed-by: Steven Price <steven.price@arm.com>

I'll push this to drm-misc-next.

Thanks,

Steve

> ---
>  drivers/gpu/drm/panfrost/panfrost_device.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm/panfrost/panfrost_device.c
> index 125ed973feaa..a2a09c51eed7 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_device.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_device.c
> @@ -54,7 +54,8 @@ static int panfrost_clk_init(struct panfrost_device *pfdev)
>  	if (IS_ERR(pfdev->bus_clock)) {
>  		dev_err(pfdev->dev, "get bus_clock failed %ld\n",
>  			PTR_ERR(pfdev->bus_clock));
> -		return PTR_ERR(pfdev->bus_clock);
> +		err = PTR_ERR(pfdev->bus_clock);
> +		goto disable_clock;
>  	}
>  
>  	if (pfdev->bus_clock) {
> 


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

end of thread, other threads:[~2021-06-11 10:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-08 14:38 [PATCH -next] drm/panfrost: Fix missing clk_disable_unprepare() on error in panfrost_clk_init() Wei Yongjun
2021-06-11 10:32 ` Steven Price

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).