brcmf: Fix null pointer exception in bcdc_hdrpull
authorPer Forlin <per.forlin@gmail.com>
Sun, 17 Apr 2016 13:25:03 +0000 (15:25 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 26 Apr 2016 09:18:37 +0000 (12:18 +0300)
commit53985dccb1c98b7af080e2314bff0c5024e781b0
tree38cfe040a910bb1f9118d2dceddd651d2184e000
parent7705ba6f7badb8cf38a0a19dad71e11a77ecb9cd
brcmf: Fix null pointer exception in bcdc_hdrpull

In fwsignal.c: brcmf_fws_commit_skb()
...
if (rc < 0) {
  entry->transit_count--;
    if (entry->suppressed)
      entry->suppr_transit_count--;
      (void)brcmf_proto_hdrpull(fws->drvr, false, skb, NULL);
                                                     ^^^^^^^
    goto rollback;
}
...

The call to hdrpull will trigger a null pointer exception
unless a null check is made in the method implementation.

Signed-off-by: Per Forlin <per.forlin@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c