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: <20130429163338.GE23799@roeck-us.net>
Date:	Mon, 29 Apr 2013 09:33:38 -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 3/5] watchdog: pnx4008_wdt: use devm_clk_get()

On Mon, Apr 29, 2013 at 06:16:14PM +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/pnx4008_wdt.c |    7 ++-----
>  1 files changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c
> index a3684a3..b30bd43 100644
> --- a/drivers/watchdog/pnx4008_wdt.c
> +++ b/drivers/watchdog/pnx4008_wdt.c
> @@ -159,13 +159,13 @@ static int pnx4008_wdt_probe(struct platform_device *pdev)
>  	if (IS_ERR(wdt_base))
>  		return PTR_ERR(wdt_base);
>  
> -	wdt_clk = clk_get(&pdev->dev, NULL);
> +	wdt_clk = devm_clk_get(&pdev->dev, NULL);
>  	if (IS_ERR(wdt_clk))
>  		return PTR_ERR(wdt_clk);
>  
>  	ret = clk_enable(wdt_clk);
>  	if (ret)
> -		goto out;
> +		return ret;
>  
>  	pnx4008_wdd.bootstatus = (readl(WDTIM_RES(wdt_base)) & WDOG_RESET) ?
>  			WDIOF_CARDRESET : 0;
> @@ -186,8 +186,6 @@ static int pnx4008_wdt_probe(struct platform_device *pdev)
>  
>  disable_clk:
>  	clk_disable(wdt_clk);
> -out:
> -	clk_put(wdt_clk);
>  	return ret;
>  }
>  
> @@ -196,7 +194,6 @@ static int pnx4008_wdt_remove(struct platform_device *pdev)
>  	watchdog_unregister_device(&pnx4008_wdd);
>  
>  	clk_disable(wdt_clk);
> -	clk_put(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