Search Linux Wireless

Re: [PATCH] compat: Fix module_init return type from void to int.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2012-03-06 at 10:55 +0100, Nicolas Cavallari wrote:
> 086f3a1 overrode module_init to make it depend on compat, but the
> overriding module_init has return type 'void', so strange things would
> happen when the module loading code see that init_module() returns
> positive values.  This patch makes it return the value returned by
> the overriden module_init.
> 
> Signed-off-by: Nicolas Cavallari <cavallar@xxxxxx>
> ---
> On 05/03/2012 22:50, Gmeiner Maximilian wrote:
> > After compiling from the bleeding-edge without any errors this is what I get in kern.log when doing modprobe ath9k
> 
> I had the same problem with a completely different architecture and device,
> and this patch fixed it.
> 
> diff --git a/include/linux/compat-2.6.h b/include/linux/compat-2.6.h
> index bb00cd4..5715ce5 100644
> --- a/include/linux/compat-2.6.h
> +++ b/include/linux/compat-2.6.h
> @@ -27,10 +27,10 @@ void compat_dependency_symbol(void);
>  
>  #undef module_init
>  #define module_init(initfn)						\
> -	static void __init __init_compat(void)				\
> +	static int __init __init_compat(void)				\
>  	{								\
>  		compat_dependency_symbol();				\
> -		initfn();						\
> +		return initfn();					\


Yikes, you're right, thanks for the patch!

Acked-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux