linux/drivers/net/wireless/broadcom
Dan Carpenter 81542fac6e brcmfmac: testing the wrong variable in brcmf_rx_hdrpull()
Smatch complains about this code:

    drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c:335 brcmf_rx_hdrpull()
    error: we previously assumed '*ifp' could be null (see line 333)

The problem is that we recently changed these from "ifp" to "*ifp" but
there was one that we didn't update.

-       if (ret || !ifp || !ifp->ndev) {
+       if (ret || !(*ifp) || !(*ifp)->ndev) {
                if (ret != -ENODATA && ifp)
                                       ^^^
-                       ifp->stats.rx_errors++;
+                       (*ifp)->stats.rx_errors++;

I have updated it to *ifp as well.  We always call this function is a
non-NULL "ifp" pointer, btw.

Fixes: c462ebcdfe ('brcmfmac: create common function for handling brcmf_proto_hdrpull()')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-04-26 12:29:43 +03:00
..
b43 cfg80211: remove enum ieee80211_band 2016-04-12 15:56:15 +02:00
b43legacy cfg80211: remove enum ieee80211_band 2016-04-12 15:56:15 +02:00
brcm80211 brcmfmac: testing the wrong variable in brcmf_rx_hdrpull() 2016-04-26 12:29:43 +03:00
Kconfig brcm80211: move under broadcom vendor directory 2015-11-18 11:24:22 +02:00
Makefile brcm80211: move under broadcom vendor directory 2015-11-18 11:24:22 +02:00