]> err.no Git - linux-2.6/blobdiff - net/mac80211/ieee80211.c
ocfs2: Unlock mutex in local alloc failure case
[linux-2.6] / net / mac80211 / ieee80211.c
index 6c63dcf9f1ec175b171dafcf5ea014c0977813fc..ff2172ffd8611758ba00efa2abc349892ca11015 100644 (file)
@@ -1650,6 +1650,7 @@ static int ieee80211_master_start_xmit(struct sk_buff *skb,
        if (skb_headroom(skb) < headroom) {
                if (pskb_expand_head(skb, headroom, 0, GFP_ATOMIC)) {
                        dev_kfree_skb(skb);
+                       dev_put(odev);
                        return 0;
                }
        }
@@ -4677,7 +4678,6 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb,
                        memset(skb->cb, 0, sizeof(skb->cb));
                        netif_rx(skb);
                        skb = skb2;
-                       break;
                }
        }
  out:
@@ -4986,8 +4986,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
         * and we need some headroom for passing the frame to monitor
         * interfaces, but never both at the same time.
         */
-       local->tx_headroom = max(local->hw.extra_tx_headroom,
-                                sizeof(struct ieee80211_tx_status_rtap_hdr));
+       local->tx_headroom = max_t(unsigned int , local->hw.extra_tx_headroom,
+                                  sizeof(struct ieee80211_tx_status_rtap_hdr));
 
        debugfs_hw_add(local);
 
@@ -5259,7 +5259,7 @@ static void __exit ieee80211_exit(void)
 }
 
 
-module_init(ieee80211_init);
+subsys_initcall(ieee80211_init);
 module_exit(ieee80211_exit);
 
 MODULE_DESCRIPTION("IEEE 802.11 subsystem");