lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 23 Feb 2017 11:48:12 -0500
From:   Sean Paul <seanpaul@...omium.org>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc:     mark.yao@...k-chips.com, airlied@...ux.ie, heiko@...ech.de,
        dri-devel@...ts.freedesktop.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-rockchip@...ts.infradead.org, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH v2] drm/rockchip: cdn-dp: Fix error handling

On Mon, Feb 20, 2017 at 08:08:15AM +0100, Christophe JAILLET wrote:
> It is likely that both 'clk_disable_unprepare()' should be called if
> 'pm_runtime_get_sync()' fails.
> 
> Add a new label for that, because 'err_set_rate' is not meaningful in this
> case.
> 
> Add a missing call to 'pm_runtime_put()'.
> 
> Fixes: 1a0f7ed3abe2 ("drm/rockchip: cdn-dp: add cdn DP support for rk3399")
> 

Applied to drm-misc-next-fixes

Thanks,

Sean

> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> ---
> V2: rename label
>     add missing call to 'pm_runtime_put_sync()' in error path
> ---
>  drivers/gpu/drm/rockchip/cdn-dp-core.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c
> index 9ab67a670885..0fe1ec8b8fb1 100644
> --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c
> +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c
> @@ -111,7 +111,7 @@ static int cdn_dp_clk_enable(struct cdn_dp_device *dp)
>  	ret = pm_runtime_get_sync(dp->dev);
>  	if (ret < 0) {
>  		DRM_DEV_ERROR(dp->dev, "cannot get pm runtime %d\n", ret);
> -		goto err_pclk;
> +		goto err_pm_runtime_get;
>  	}
>  
>  	reset_control_assert(dp->core_rst);
> @@ -133,6 +133,8 @@ static int cdn_dp_clk_enable(struct cdn_dp_device *dp)
>  	return 0;
>  
>  err_set_rate:
> +	pm_runtime_put(dp->dev);
> +err_pm_runtime_get:
>  	clk_disable_unprepare(dp->core_clk);
>  err_core_clk:
>  	clk_disable_unprepare(dp->pclk);
> -- 
> 2.9.3

-- 
Sean Paul, Software Engineer, Google / Chromium OS

Powered by blists - more mailing lists