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]
Date:	Tue, 19 Feb 2013 14:10:13 +0200
From:	Felipe Balbi <balbi@...com>
To:	Afzal Mohammed <afzal@...com>
CC:	<linux-omap@...r.kernel.org>,
	<linux-arm-kernel@...ts.infradead.org>,
	<devicetree-discuss@...ts.ozlabs.org>, <linux-doc@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>,
	Russell King <linux@....linux.org.uk>,
	Tony Lindgren <tony@...mide.com>,
	Marc Zyngier <marc.zyngier@....com>,
	Nicolas Pitre <nico@...aro.org>,
	Santosh Shilimkar <santosh.shilimkar@...com>,
	Will Deacon <will.deacon@....com>,
	Linus Walleij <linus.walleij@...aro.org>,
	Rob Herring <rob.herring@...xeda.com>,
	Grant Likely <grant.likely@...retlab.ca>,
	Rob Landley <rob@...dley.net>, Sekhar Nori <nsekhar@...com>,
	Syed Mohammed Khasim <khasim@...com>
Subject: Re: [PATCH, RFC 1/8] ARM: localtimer: return percpu clkevt on
 register

Hi,

On Mon, Feb 18, 2013 at 05:06:39PM +0530, Afzal Mohammed wrote:
> @@ -315,6 +315,7 @@ static struct local_timer_ops twd_lt_ops __cpuinitdata = {
>  static int __init twd_local_timer_common_register(struct device_node *np)
>  {
>  	int err;
> +	struct clock_event_device *evt;
>  
>  	twd_evt = alloc_percpu(struct clock_event_device *);
>  	if (!twd_evt) {
> @@ -328,8 +329,8 @@ static int __init twd_local_timer_common_register(struct device_node *np)
>  		goto out_free;
>  	}
>  
> -	err = local_timer_register(&twd_lt_ops);
> -	if (err)
> +	evt = local_timer_register(&twd_lt_ops);
> +	if (IS_ERR(evt))
>  		goto out_irq;

this is wrong. Will return 0 even in the error case. Correct version
would be:

if (IS_ERR(evt)) {
	err = PTR_ERR(evt);
	goto out_irq;
}

-- 
balbi

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

Powered by blists - more mailing lists