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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141119143259.GC4029@saruman>
Date:	Wed, 19 Nov 2014 08:32:59 -0600
From:	Felipe Balbi <balbi@...com>
To:	Julien CHAUVEAU <julien.chauveau@...-technologies.fr>
CC:	David Airlie <airlied@...ux.ie>, Rob Clark <robdclark@...il.com>,
	"open list:DRM DRIVERS" <dri-devel@...ts.freedesktop.org>,
	open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/tilcdc: add missing clk_put in tilcdc_unload()

On Wed, Nov 19, 2014 at 03:13:20PM +0100, Julien CHAUVEAU wrote:
> We need to call clk_put on display clock, in the same way as functional clock.
> 
> Signed-off-by: Julien CHAUVEAU <julien.chauveau@...-technologies.fr>
> ---
>  drivers/gpu/drm/tilcdc/tilcdc_drv.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
> index 79a34cb..ccc1cdb 100644
> --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
> +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
> @@ -136,6 +136,9 @@ static int tilcdc_unload(struct drm_device *dev)
>  			CPUFREQ_TRANSITION_NOTIFIER);
>  #endif
>  
> +	if (priv->disp_clk)
> +		clk_put(priv->disp_clk);
> +
>  	if (priv->clk)
>  		clk_put(priv->clk);

we should actually remove the priv->$clk check. clk_put() is safe
against NULL pointers.

-- 
balbi

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ