]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/ieee80211/softmac/ieee80211softmac_io.c
[PATCH] softmac: properly check return value of ieee80211softmac_alloc_mgt
[karo-tx-linux.git] / net / ieee80211 / softmac / ieee80211softmac_io.c
index a142daea62972d12c0f9ffd729fca415d1f6c694..febc51dbb41247119f501625f6bd54f537dc0afc 100644 (file)
@@ -308,7 +308,7 @@ ieee80211softmac_disassoc_deauth(struct ieee80211_disassoc **pkt,
 {
        /* Allocate Packet */
        (*pkt) = (struct ieee80211_disassoc *)ieee80211softmac_alloc_mgt(2);
-       if (unlikely(pkt == NULL))
+       if (unlikely((*pkt) == NULL))
                return 0;
        ieee80211softmac_hdr_3addr(mac, &((*pkt)->header), type, net->bssid, net->bssid);
        /* Reason */