Linux wireless drivers development
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: nbd@nbd.name
Cc: linux-wireless@vger.kernel.org
Subject: [bug report] mt76: add driver code for MT76x2e
Date: Thu, 14 Dec 2017 11:02:02 +0300	[thread overview]
Message-ID: <20171214080158.azjhsjlwluw4iysl@mwanda> (raw)

Hello Felix Fietkau,

This is a semi-automatic email about new static checker warnings.

The patch 7bc04215a66b: "mt76: add driver code for MT76x2e" from Nov 
21, 2017, leads to the following Smatch complaint:

    drivers/net/wireless/mediatek/mt76/mt76x2_mac.c:189 mt76x2_mac_write_txwi()
    error: we previously assumed 'wcid' could be null (see line 180)

drivers/net/wireless/mediatek/mt76/mt76x2_mac.c
   179	
   180		if (wcid)
                    ^^^^
Check for NULL

   181			txwi->wcid = wcid->idx;
   182		else
   183			txwi->wcid = 0xff;
   184	
   185		txwi->pktid = 1;
   186	
   187		spin_lock_bh(&dev->mt76.lock);
   188		if (rate->idx < 0 || !rate->count) {
   189			txwi->rate = wcid->tx_rate;
                                     ^^^^^^^^^^^^^
Unchecked dereference

   190			max_txpwr_adj = wcid->max_txpwr_adj;
   191			nss = wcid->tx_rate_nss;

regards,
dan carpenter

             reply	other threads:[~2017-12-14  8:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-14  8:02 Dan Carpenter [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-12-14  8:02 [bug report] mt76: add driver code for MT76x2e Dan Carpenter

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=20171214080158.azjhsjlwluw4iysl@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nbd@nbd.name \
    /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