mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Samudrala, Sridhar" <sridhar.samudrala@intel.com>
To: Jiefeng Li <jiefeng_li@hust.edu.cn>, Felix Fietkau <nbd@nbd.name>,
	"Lorenzo Bianconi" <lorenzo@kernel.org>,
	Ryder Lee <ryder.lee@mediatek.com>,
	"Shayne Chen" <shayne.chen@mediatek.com>,
	Sean Wang <sean.wang@mediatek.com>,
	"Kalle Valo" <kvalo@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno 
	<angelogioacchino.delregno@collabora.com>
Cc: Dongliang Mu <dzm91@hust.edu.cn>,
	<linux-wireless@vger.kernel.org>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>
Subject: Re: [PATCH] wifi: mt76: mt7921: fix missing unwind goto in `mt7921u_probe`
Date: Wed, 12 Apr 2023 09:12:52 -0500	[thread overview]
Message-ID: <11811efa-7722-fded-b0bb-64808cfc1336@intel.com> (raw)
In-Reply-To: <20230412062234.4810-1-jiefeng_li@hust.edu.cn>



On 4/12/2023 1:22 AM, Jiefeng Li wrote:
> `mt7921u_dma_init` can only return zero or negative number according to its
> definition. When it returns non-zero number, there exists an error and this
> function should handle this error rather than return directly.
> 
> Fixes: 0d2afe09fad5 ("mt76: mt7921: add mt7921u driver")
> Signed-off-by: Jiefeng Li <jiefeng_li@hust.edu.cn>
> Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn>

Reviewed-by: Sridhar Samudrala <sridhar.samudrala@intel.com>

> ---
> The issue is discovered by static analysis, and the patch is not tested yet.
> ---
>   drivers/net/wireless/mediatek/mt76/mt7921/usb.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/usb.c b/drivers/net/wireless/mediatek/mt76/mt7921/usb.c
> index 8fef09ed29c9..70c9bbdbf60e 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7921/usb.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7921/usb.c
> @@ -272,7 +272,7 @@ static int mt7921u_probe(struct usb_interface *usb_intf,
>   
>   	ret = mt7921u_dma_init(dev, false);
>   	if (ret)
> -		return ret;
> +		goto error;
>   
>   	hw = mt76_hw(dev);
>   	/* check hw sg support in order to enable AMSDU */

      reply	other threads:[~2023-04-12 14:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-12  6:22 Jiefeng Li
2023-04-12 14:12 ` Samudrala, Sridhar [this message]

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=11811efa-7722-fded-b0bb-64808cfc1336@intel.com \
    --to=sridhar.samudrala@intel.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=davem@davemloft.net \
    --cc=dzm91@hust.edu.cn \
    --cc=edumazet@google.com \
    --cc=jiefeng_li@hust.edu.cn \
    --cc=kuba@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=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --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

all inboxes | Powered by JetHome®