From c34baabf3b2faaa5cecc8cbbb82b5f2632bfe3f1 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 6 Nov 2018 13:35:32 +0100 Subject: [PATCH] mt7603: add missing unlock in case changing the channel fails Signed-off-by: Felix Fietkau --- mt7603/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mt7603/main.c b/mt7603/main.c index 60776461..c648f8f1 100644 --- a/mt7603/main.c +++ b/mt7603/main.c @@ -145,7 +145,7 @@ mt7603_set_channel(struct mt7603_dev *dev, struct cfg80211_chan_def *def) mt76_rmw_field(dev, MT_AGG_BWCR, MT_AGG_BWCR_BW, bw); ret = mt7603_mcu_set_channel(dev); if (ret) - return ret; + goto out; if (def->chan->band == NL80211_BAND_5GHZ) { idx = 1; @@ -177,9 +177,10 @@ mt7603_set_channel(struct mt7603_dev *dev, struct cfg80211_chan_def *def) dev->survey_time = ktime_get_boottime(); +out: mutex_unlock(&dev->mt76.mutex); - return 0; + return ret; } static int