All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: drivers/net/wireless/mediatek/mt76/sdio.c:349 mt76s_alloc_tx() warn: passing a valid pointer to 'PTR_ERR'
Date: Fri, 01 Apr 2022 14:38:15 +0800	[thread overview]
Message-ID: <202204011402.LeDTVd9p-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 3248 bytes --]

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Sean Wang <sean.wang@mediatek.com>
CC: Felix Fietkau <nbd@nbd.name>
CC: Lorenzo Bianconi <lorenzo@kernel.org>

Hi Sean,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   e8b767f5e04097aaedcd6e06e2270f9fe5282696
commit: 48fab5bbef4092d925ab3214773ad12e68807223 mt76: mt7921: introduce mt7921s support
date:   5 months ago
:::::: branch date: 7 hours ago
:::::: commit date: 5 months ago
config: mips-randconfig-m031-20220331 (https://download.01.org/0day-ci/archive/20220401/202204011402.LeDTVd9p-lkp(a)intel.com/config)
compiler: mipsel-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

New smatch warnings:
drivers/net/wireless/mediatek/mt76/sdio.c:349 mt76s_alloc_tx() warn: passing a valid pointer to 'PTR_ERR'

Old smatch warnings:
drivers/net/wireless/mediatek/mt76/sdio.c:357 mt76s_alloc_tx() warn: passing a valid pointer to 'PTR_ERR'

vim +/PTR_ERR +349 drivers/net/wireless/mediatek/mt76/sdio.c

a2a93548db88b7 Lorenzo Bianconi 2020-11-11  340  
d512b008fafb62 Lorenzo Bianconi 2021-10-13  341  int mt76s_alloc_tx(struct mt76_dev *dev)
a2a93548db88b7 Lorenzo Bianconi 2020-11-11  342  {
a2a93548db88b7 Lorenzo Bianconi 2020-11-11  343  	struct mt76_queue *q;
a2a93548db88b7 Lorenzo Bianconi 2020-11-11  344  	int i;
a2a93548db88b7 Lorenzo Bianconi 2020-11-11  345  
a2a93548db88b7 Lorenzo Bianconi 2020-11-11  346  	for (i = 0; i <= MT_TXQ_PSD; i++) {
a2a93548db88b7 Lorenzo Bianconi 2020-11-11  347  		q = mt76s_alloc_tx_queue(dev);
a2a93548db88b7 Lorenzo Bianconi 2020-11-11  348  		if (IS_ERR(q))
a2a93548db88b7 Lorenzo Bianconi 2020-11-11 @349  			return PTR_ERR(q);
a2a93548db88b7 Lorenzo Bianconi 2020-11-11  350  
a2a93548db88b7 Lorenzo Bianconi 2020-11-11  351  		q->qid = i;
91990519298e23 Lorenzo Bianconi 2020-11-11  352  		dev->phy.q_tx[i] = q;
d39b52e31aa641 Sean Wang        2020-07-15  353  	}
d39b52e31aa641 Sean Wang        2020-07-15  354  
a2a93548db88b7 Lorenzo Bianconi 2020-11-11  355  	q = mt76s_alloc_tx_queue(dev);
a2a93548db88b7 Lorenzo Bianconi 2020-11-11  356  	if (IS_ERR(q))
a2a93548db88b7 Lorenzo Bianconi 2020-11-11  357  		return PTR_ERR(q);
a2a93548db88b7 Lorenzo Bianconi 2020-11-11  358  
e637763b606b7a Lorenzo Bianconi 2020-11-11  359  	q->qid = MT_MCUQ_WM;
e637763b606b7a Lorenzo Bianconi 2020-11-11  360  	dev->q_mcu[MT_MCUQ_WM] = q;
a2a93548db88b7 Lorenzo Bianconi 2020-11-11  361  
d39b52e31aa641 Sean Wang        2020-07-15  362  	return 0;
d39b52e31aa641 Sean Wang        2020-07-15  363  }
d512b008fafb62 Lorenzo Bianconi 2021-10-13  364  EXPORT_SYMBOL_GPL(mt76s_alloc_tx);
d39b52e31aa641 Sean Wang        2020-07-15  365  

:::::: The code at line 349 was first introduced by commit
:::::: a2a93548db88b73f5781f4c3df3c757656d50c67 mt76: sdio: introduce mt76s_alloc_tx_queue

:::::: TO: Lorenzo Bianconi <lorenzo@kernel.org>
:::::: CC: Felix Fietkau <nbd@nbd.name>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

             reply	other threads:[~2022-04-01  6:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-01  6:38 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-05-10 12:31 drivers/net/wireless/mediatek/mt76/sdio.c:349 mt76s_alloc_tx() warn: passing a valid pointer to 'PTR_ERR' kernel test robot
2022-06-04 23:50 kernel test robot

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=202204011402.LeDTVd9p-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.