Restore error message on alloc_skb failure
authormtaylor <mtaylor@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Thu, 22 Nov 2007 00:49:31 +0000 (00:49 +0000)
committermtaylor <mtaylor@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Thu, 22 Nov 2007 00:49:31 +0000 (00:49 +0000)
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2910 0192ed92-7a03-0410-a25b-9323aeb14dbd

ath/if_ath.c

index 8a16724bf6d1e39462d7f4d1ffb7d875caad0f20..8e65b22e738c5b65e85d34b34e8ec4576ec5eec6 100644 (file)
@@ -10448,10 +10448,11 @@ txcont_queue_packet(struct ieee80211com *ic, struct ath_txq* txq)
        {
                bf  = ath_take_txbuf_locked(sc);
                skb = alloc_skb(datasz + sizeof(struct ieee80211_frame) + IEEE80211_CRC_LEN, GFP_ATOMIC);
-               wh  = (struct ieee80211_frame*)skb_put(skb, sizeof(struct ieee80211_frame));
                if (NULL == skb) {
+                       printk(KERN_ERR "%s: %s: alloc_skb returned null!\n", DEV_NAME(dev), __func__); 
                        BUG();
                }
+               wh  = (struct ieee80211_frame*)skb_put(skb, sizeof(struct ieee80211_frame));
                if (NULL == bf) {
                        printk(KERN_ERR "%s: %s: STAILQ_FIRST(&sc->sc_txbuf) returned null!\n", DEV_NAME(dev), __func__);
                        BUG();