From patchwork Mon Jan 30 12:36:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Zhandarovich X-Patchwork-Id: 648915 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3CB39C61DA4 for ; Mon, 30 Jan 2023 12:37:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236929AbjA3MhT (ORCPT ); Mon, 30 Jan 2023 07:37:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229965AbjA3MhP (ORCPT ); Mon, 30 Jan 2023 07:37:15 -0500 Received: from exchange.fintech.ru (exchange.fintech.ru [195.54.195.159]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33C2B36FF9; Mon, 30 Jan 2023 04:37:11 -0800 (PST) Received: from Ex16-01.fintech.ru (10.0.10.18) by exchange.fintech.ru (195.54.195.169) with Microsoft SMTP Server (TLS) id 14.3.498.0; Mon, 30 Jan 2023 15:37:05 +0300 Received: from localhost (10.0.253.157) by Ex16-01.fintech.ru (10.0.10.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Mon, 30 Jan 2023 15:37:05 +0300 From: Nikita Zhandarovich To: , Greg Kroah-Hartman CC: Nikita Zhandarovich , Felix Fietkau , Lorenzo Bianconi , Ryder Lee , Kalle Valo , "David S. Miller" , Jakub Kicinski , , , , , "Alexey Khoroshilov" , Subject: [PATCH 5.10 1/1] mt76: fix mt7615_init_tx_queues() return value Date: Mon, 30 Jan 2023 04:36:55 -0800 Message-ID: <20230130123655.86339-2-n.zhandarovich@fintech.ru> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230130123655.86339-1-n.zhandarovich@fintech.ru> References: <20230130123655.86339-1-n.zhandarovich@fintech.ru> MIME-Version: 1.0 X-Originating-IP: [10.0.253.157] X-ClientProxiedBy: Ex16-01.fintech.ru (10.0.10.18) To Ex16-01.fintech.ru (10.0.10.18) Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org mt7615_init_tx_queues() returns 0 regardless of how final mt7615_init_tx_queue() performs. If mt7615_init_tx_queue() fails (due to memory issues, for instance), parent function will still erroneously return 0. This change takes into account ret value of mt7615_init_tx_queue() when finishing up mt7615_init_tx_queues(). Fixes: 04b8e65922f6 ("mt76: add mac80211 driver for MT7615 PCIe-based chipsets") Signed-off-by: Nikita Zhandarovich drivers/net/wireless/mediatek/mt76/mt7615/dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/dma.c b/drivers/net/wireless/mediatek/mt76/mt7615/dma.c index bf8ae14121db..47922c1dd6e3 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/dma.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/dma.c @@ -82,7 +82,7 @@ mt7615_init_tx_queues(struct mt7615_dev *dev) ret = mt7615_init_tx_queue(dev, MT_TXQ_MCU, MT7615_TXQ_MCU, MT7615_TX_MCU_RING_SIZE); - return 0; + return ret; } static int mt7615_poll_tx(struct napi_struct *napi, int budget)