[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7966ab38-711a-4c46-b3c8-ac8ce34b2949@web.de>
Date: Tue, 1 Oct 2024 21:08:12 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Christophe Jaillet <christophe.jaillet@...adoo.fr>,
linux-mediatek@...ts.infradead.org, linux-wireless@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
Angelo Gioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
Felix Fietkau <nbd@....name>, Kalle Valo <kvalo@...nel.org>,
Lorenzo Bianconi <lorenzo@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>, Ryder Lee
<ryder.lee@...iatek.com>, Sean Wang <sean.wang@...iatek.com>,
Shayne Chen <shayne.chen@...iatek.com>
Cc: kernel-janitors@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] wifi: mt76: mt7915: Fix an error handling path in
mt7915_add_interface()
> If mt76_wcid_alloc() fails, the "mt76.mutex" mutex needs to be released as
> done in the other error handling path of mt7915_add_interface().
paths?
…
> +++ b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
> @@ -246,8 +246,10 @@ static int mt7915_add_interface(struct ieee80211_hw *hw,
> phy->omac_mask |= BIT_ULL(mvif->mt76.omac_idx);
>
> idx = mt76_wcid_alloc(dev->mt76.wcid_mask, mt7915_wtbl_size(dev));
> - if (idx < 0)
> - return -ENOSPC;
> + if (idx < 0) {
> + ret = -ENOSPC;
> + goto out;
> + }
…
Would you dare to support another jump target for this assignment statement?
Regards,
Markus
Powered by blists - more mailing lists