diff options
author | Lorenzo Bianconi <lorenzo@kernel.org> | 2020-08-08 21:25:41 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2020-09-24 19:10:15 +0300 |
commit | 346f810e22428cdf73ee5cf2e0ce1b79d5671de5 (patch) | |
tree | de982057b0d616769058985b9c908e0d7fcf7db3 /drivers/net/wireless/mediatek | |
parent | b443e55fb5b371e971bafbceae28d6551376631c (diff) | |
download | linux-346f810e22428cdf73ee5cf2e0ce1b79d5671de5.tar.xz |
mt76: mt7615: release mutex in mt7615_reset_test_set
Reduce scope of mutex_acquire/mutex_release in mt7615_reset_test_set
routine in order to fix the following static checker warning:
drivers/net/wireless/mediatek/mt76/mt7615/debugfs.c:179
mt7615_reset_test_set()
warn: inconsistent returns 'dev->mt76.mutex'.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: ea4906c4be49 ("mt76: mt7615: wake device before accessing regmap in debugfs")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7615/debugfs.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/debugfs.c b/drivers/net/wireless/mediatek/mt76/mt7615/debugfs.c index 88931658a9fb..937cb71bed64 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/debugfs.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/debugfs.c @@ -165,15 +165,14 @@ mt7615_reset_test_set(void *data, u64 val) if (!mt7615_wait_for_mcu_init(dev)) return 0; - mt7615_mutex_acquire(dev); - skb = alloc_skb(1, GFP_KERNEL); if (!skb) return -ENOMEM; skb_put(skb, 1); - mt76_tx_queue_skb_raw(dev, 0, skb, 0); + mt7615_mutex_acquire(dev); + mt76_tx_queue_skb_raw(dev, 0, skb, 0); mt7615_mutex_release(dev); return 0; |