net: wireless: fix misplaced #endif in net/wireless/nl80211.c
authorYann Soubeyrand <ysoubeyrand@adeneo-embedded.com>
Wed, 18 Jun 2014 12:57:29 +0000 (14:57 +0200)
committerDmitry Shmidt <dimitrysh@google.com>
Fri, 27 Jun 2014 22:26:49 +0000 (15:26 -0700)
The patch "nl80211: cumulative vendor command support patch" introduced
compilation error in file net/wireless/nl80211.c. The nl80211_vendor_mcgrp
variable is defined only if the CONFIG_NL80211_TESTMODE preprocessor constant
is defined. However, this variable is later used wether
CONFIG_NL80211_TESTMODE is defined or not. The cause is a misplaced #endif.

Change-Id: I466488285578d57e6554a1f8ebe71d4f3385ecf2
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
net/wireless/nl80211.c

index 150a38fc346e8b1f60739a7a370f4e7bd3ae5f32..ec1356fab67eea76ca3a7e42a6517eb26c342429 100644 (file)
@@ -10973,11 +10973,11 @@ int nl80211_init(void)
        err = genl_register_mc_group(&nl80211_fam, &nl80211_testmode_mcgrp);
        if (err)
                goto err_out;
-#endif
 
        err = genl_register_mc_group(&nl80211_fam, &nl80211_vendor_mcgrp);
        if (err)
                goto err_out;
+#endif
 
        err = netlink_register_notifier(&nl80211_netlink_notifier);
        if (err)