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: <20130429163242.GC23799@roeck-us.net>
Date:	Mon, 29 Apr 2013 09:32:42 -0700
From:	Guenter Roeck <linux@...ck-us.net>
To:	Jingoo Han <jg1.han@...sung.com>
Cc:	'Andrew Morton' <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, 'Wim Van Sebroeck' <wim@...ana.be>,
	linux-watchdog@...r.kernel.org
Subject: Re: [PATCH RESEND 1/5] watchdog: dw_wdt: use devm_clk_get()

On Mon, Apr 29, 2013 at 06:15:26PM +0900, Jingoo Han wrote:
> Use devm_clk_get() to make cleanup paths more simple.
> 
> Signed-off-by: Jingoo Han <jg1.han@...sung.com>

Reviewed-by: Guenter Roeck <linux@...ck-us.net>

> ---
>  drivers/watchdog/dw_wdt.c |    7 ++-----
>  1 files changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c
> index 2037669..2e70fd0 100644
> --- a/drivers/watchdog/dw_wdt.c
> +++ b/drivers/watchdog/dw_wdt.c
> @@ -305,13 +305,13 @@ static int dw_wdt_drv_probe(struct platform_device *pdev)
>  	if (IS_ERR(dw_wdt.regs))
>  		return PTR_ERR(dw_wdt.regs);
>  
> -	dw_wdt.clk = clk_get(&pdev->dev, NULL);
> +	dw_wdt.clk = devm_clk_get(&pdev->dev, NULL);
>  	if (IS_ERR(dw_wdt.clk))
>  		return PTR_ERR(dw_wdt.clk);
>  
>  	ret = clk_enable(dw_wdt.clk);
>  	if (ret)
> -		goto out_put_clk;
> +		return ret;
>  
>  	spin_lock_init(&dw_wdt.lock);
>  
> @@ -327,8 +327,6 @@ static int dw_wdt_drv_probe(struct platform_device *pdev)
>  
>  out_disable_clk:
>  	clk_disable(dw_wdt.clk);
> -out_put_clk:
> -	clk_put(dw_wdt.clk);
>  
>  	return ret;
>  }
> @@ -338,7 +336,6 @@ static int dw_wdt_drv_remove(struct platform_device *pdev)
>  	misc_deregister(&dw_wdt_miscdev);
>  
>  	clk_disable(dw_wdt.clk);
> -	clk_put(dw_wdt.clk);
>  
>  	return 0;
>  }
> -- 
> 1.7.2.5
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ