From: Kalle Valo <kvalo@codeaurora.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Brett Rudley <brudley@broadcom.com>,
Arend van Spriel <arend@broadcom.com>,
"Franky (Zhenhui) Lin" <frankyl@broadcom.com>,
Hante Meuleman <meuleman@broadcom.com>,
Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>,
Franky Lin <franky.lin@broadcom.com>,
linux-wireless@vger.kernel.org, brcm80211-dev-list@broadcom.com,
kernel-janitors@vger.kernel.org
Subject: Re: brcmfmac: testing the wrong variable in brcmf_rx_hdrpull()
Date: Tue, 26 Apr 2016 09:30:10 +0000 (UTC) [thread overview]
Message-ID: <20160426093010.1EFA76029D@smtp.codeaurora.org> (raw)
In-Reply-To: <20160419142543.GC4876@mwanda>
> 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: c462ebcdfe42 ('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>
Thanks, applied to wireless-drivers-next.git.
Kalle Valo
prev parent reply other threads:[~2016-04-26 9:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-19 14:25 [patch] brcmfmac: testing the wrong variable in brcmf_rx_hdrpull() Dan Carpenter
2016-04-20 8:31 ` Arend Van Spriel
2016-04-26 9:30 ` Kalle Valo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160426093010.1EFA76029D@smtp.codeaurora.org \
--to=kvalo@codeaurora.org \
--cc=arend@broadcom.com \
--cc=brcm80211-dev-list@broadcom.com \
--cc=brudley@broadcom.com \
--cc=dan.carpenter@oracle.com \
--cc=franky.lin@broadcom.com \
--cc=frankyl@broadcom.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=meuleman@broadcom.com \
--cc=pieter-paul.giesberts@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).