From: Markus Elfring <Markus.Elfring@web.de>
To: Christophe Jaillet <christophe.jaillet@wanadoo.fr>,
linux-mediatek@lists.infradead.org,
linux-wireless@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Angelo Gioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Felix Fietkau <nbd@nbd.name>, Kalle Valo <kvalo@kernel.org>,
Lorenzo Bianconi <lorenzo@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
Ryder Lee <ryder.lee@mediatek.com>,
Sean Wang <sean.wang@mediatek.com>,
Shayne Chen <shayne.chen@mediatek.com>
Cc: kernel-janitors@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] wifi: mt76: mt7915: Fix an error handling path in mt7915_add_interface()
Date: Tue, 1 Oct 2024 21:08:12 +0200 [thread overview]
Message-ID: <7966ab38-711a-4c46-b3c8-ac8ce34b2949@web.de> (raw)
In-Reply-To: <b9d8fbfc19360bfe60b9cea1cb0f735ab3b4bc26.1727639596.git.christophe.jaillet@wanadoo.fr>
> 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
next prev parent reply other threads:[~2024-10-01 20:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-29 19:53 [PATCH] wifi: mt76: mt7915: Fix an error handling path in mt7915_add_interface() Christophe JAILLET
2024-10-01 19:08 ` Markus Elfring [this message]
2024-11-18 6:03 ` Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7966ab38-711a-4c46-b3c8-ac8ce34b2949@web.de \
--to=markus.elfring@web.de \
--cc=angelogioacchino.delregno@collabora.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=kvalo@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=nbd@nbd.name \
--cc=ryder.lee@mediatek.com \
--cc=sean.wang@mediatek.com \
--cc=shayne.chen@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox