Commit 346f810e authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Felix Fietkau

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Fixes: ea4906c4 ("mt76: mt7615: wake device before accessing regmap in debugfs")
Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent b443e55f
...@@ -165,15 +165,14 @@ mt7615_reset_test_set(void *data, u64 val) ...@@ -165,15 +165,14 @@ mt7615_reset_test_set(void *data, u64 val)
if (!mt7615_wait_for_mcu_init(dev)) if (!mt7615_wait_for_mcu_init(dev))
return 0; return 0;
mt7615_mutex_acquire(dev);
skb = alloc_skb(1, GFP_KERNEL); skb = alloc_skb(1, GFP_KERNEL);
if (!skb) if (!skb)
return -ENOMEM; return -ENOMEM;
skb_put(skb, 1); 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); mt7615_mutex_release(dev);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment