[Linux-parport] [PATCH] pi_register: shuffle return values

Andrew Morton akpm at osdl.org
Thu Oct 19 18:49:30 EDT 2006


On Thu, 19 Oct 2006 21:44:06 +0400
Alexey Dobriyan <adobriyan at gmail.com> wrote:

> pi_register() returns 1 on success, 0 on failure and module
> init code looks like
> 
> 	static int __init foo_init(void)
> 	{
> 		return pi_register(&foo) - 1;
> 	}
> 
> which is not what one get used to. Converted to usual 0/-E convention.
> 
> In case of kbic driver, unwind registration. It has even more funny code
> 
> 	return (pi_register(&foo) || pi_register(&bar)) - 1;
> 


please rename the function (paride_register()?) so that any unconverted code
will nicely break.



More information about the Linux-parport mailing list