drivers/net/wireless/mediatek/mt76/mt7615/debugfs.c:133 mt7615_reset_test_set() warn: inconsistent returns 'dev->mt76.mutex'.

From: kernel test robot
Date: Wed Aug 12 2020 - 19:48:54 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7c2a69f610e64c8dec6a06a66e721f4ce1dd783a
commit: ea4906c4be4944f8341d500f83267d1ba3e8e838 mt76: mt7615: wake device before accessing regmap in debugfs
date: 3 weeks ago
config: parisc-randconfig-m031-20200811 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

smatch warnings:
drivers/net/wireless/mediatek/mt76/mt7615/debugfs.c:133 mt7615_reset_test_set() warn: inconsistent returns 'dev->mt76.mutex'.

vim +133 drivers/net/wireless/mediatek/mt76/mt7615/debugfs.c

f347f81a8ac98b Felix Fietkau 2019-12-29 109
f347f81a8ac98b Felix Fietkau 2019-12-29 110 DEFINE_DEBUGFS_ATTRIBUTE(fops_fw_debug, mt7615_fw_debug_get,
f347f81a8ac98b Felix Fietkau 2019-12-29 111 mt7615_fw_debug_set, "%lld\n");
f347f81a8ac98b Felix Fietkau 2019-12-29 112
35492cd28f2a06 Felix Fietkau 2020-01-31 113 static int
35492cd28f2a06 Felix Fietkau 2020-01-31 114 mt7615_reset_test_set(void *data, u64 val)
35492cd28f2a06 Felix Fietkau 2020-01-31 115 {
35492cd28f2a06 Felix Fietkau 2020-01-31 116 struct mt7615_dev *dev = data;
35492cd28f2a06 Felix Fietkau 2020-01-31 117 struct sk_buff *skb;
35492cd28f2a06 Felix Fietkau 2020-01-31 118
35492cd28f2a06 Felix Fietkau 2020-01-31 119 if (!mt7615_wait_for_mcu_init(dev))
35492cd28f2a06 Felix Fietkau 2020-01-31 120 return 0;
35492cd28f2a06 Felix Fietkau 2020-01-31 121
ea4906c4be4944 Lorenzo Bianconi 2020-07-03 122 mt7615_mutex_acquire(dev);
ea4906c4be4944 Lorenzo Bianconi 2020-07-03 123
35492cd28f2a06 Felix Fietkau 2020-01-31 124 skb = alloc_skb(1, GFP_KERNEL);
35492cd28f2a06 Felix Fietkau 2020-01-31 125 if (!skb)
35492cd28f2a06 Felix Fietkau 2020-01-31 126 return -ENOMEM;
35492cd28f2a06 Felix Fietkau 2020-01-31 127
35492cd28f2a06 Felix Fietkau 2020-01-31 128 skb_put(skb, 1);
35492cd28f2a06 Felix Fietkau 2020-01-31 129 mt76_tx_queue_skb_raw(dev, 0, skb, 0);
35492cd28f2a06 Felix Fietkau 2020-01-31 130
ea4906c4be4944 Lorenzo Bianconi 2020-07-03 131 mt7615_mutex_release(dev);
ea4906c4be4944 Lorenzo Bianconi 2020-07-03 132
35492cd28f2a06 Felix Fietkau 2020-01-31 @133 return 0;
35492cd28f2a06 Felix Fietkau 2020-01-31 134 }
35492cd28f2a06 Felix Fietkau 2020-01-31 135

:::::: The code at line 133 was first introduced by commit
:::::: 35492cd28f2a06623279a61955539fa6c5ae6067 mt76: mt7615: add support for testing hardware reset

:::::: TO: Felix Fietkau <nbd@xxxxxxxx>
:::::: CC: Felix Fietkau <nbd@xxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip