[rt2x00-users] [PATCH] Rt2x00 : Fix glitch in the soc ifdef RT2800PCI_WISOC.

Ivo van Doorn ivdoorn at gmail.com
Wed Apr 22 16:25:43 CDT 2009


On Wednesday 22 April 2009, Alban Browaeys wrote:
> Seems to me this one was an error, ie in case of SOC a { was missing..
> 
> Signed-off-by: Alban Browaeys <prahal at yahoo.com>
> ---
>  drivers/net/wireless/rt2x00/rt2800pci.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c 
> b/drivers/net/wireless/rt2x00/rt2800pci.c
> index 7e69113..9540453 100644
> --- a/drivers/net/wireless/rt2x00/rt2800pci.c
> +++ b/drivers/net/wireless/rt2x00/rt2800pci.c
> @@ -3211,8 +3211,7 @@ static int __init rt2800pci_init(void)
>  
>  #ifdef CONFIG_RT2800PCI_WISOC
>      ret = platform_driver_register(&rt2800soc_driver);
> -    if (ret)
> -        return ret;
> +    if (ret) {
>  #endif
>  #ifdef CONFIG_RT2800PCI_PCI
>      ret = pci_register_driver(&rt2800pci_driver);

Not only will this not compile, it will also _not_ register the
PCI driver when it should.
Without the ifdefs the code looks like:

	ret = platform_driver_register(&rt2800soc_driver);
	if (ret)
		return ret;

	ret = pci_register_driver(&rt2800pci_driver);
	if (ret) {
		platform_driver_unregister(&rt2800soc_driver);
		return ret;
	}

Ivo



More information about the users mailing list