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: 50262 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2160913wrn; Mon, 30 Jan 2023 04:53:10 -0800 (PST) X-Google-Smtp-Source: AK7set8Pd2E+N176sJDgY9jT8dOV59OhFy5uGlPdsKBWdUEoO1W7jzYfd16Ee277Q5nJlQQUyqMd X-Received: by 2002:a17:906:4f04:b0:878:785e:e57a with SMTP id t4-20020a1709064f0400b00878785ee57amr14956755eju.77.1675083190399; Mon, 30 Jan 2023 04:53:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675083190; cv=none; d=google.com; s=arc-20160816; b=YeHneKXnTw3UyKm6Al3TL3ndY3J1Rp+e4HP0X15o/oqny2iMENCMQYmU0U+fbHsfGv cR02ebT2OMK8t4cGJTEl9fzyyR4F89NIEIk/NN+vgKnyuBd0iOgDJOGDxy85yINiE/3Q mwxSOwZLQI9iZ/ze0B68wMUcqGiNThk+cz4AXuv5Dlxo+rtQ8ND/FL8xeUMQi5x+75KY S3zmcoIBhJXVV7iuNOv83vLYNhInFTxFPkGv9dNO9368m0bPd5Xt3jyx5ZWx1Q0BtPW9 8WyG/MHP9SLN+o9LOLWDe26h/JvraWvMjUFpEk5bTfXiQq3pBsoa8YEN4dj03H88gVkH QQqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=8N51dvvgNdPlIO/ogIwHg/iY57RhT5Q6RXf/Lx7Z6sQ=; b=jBsfX4etBfz7BAcPPB5BRNgOwwix5A1RYSPtfl/f2haGKakwojXt7trHrppEAVnd/m gyjSBOPoXM6WTcbXDuMRkiHwz8RhVF74ruHYO5GQhbMtPUBSnFvzFt2z1xp80KguoYpz xnHHEGGZJoMtUD9vxUiHc//PVskE3hzFMY+Nt8vntu8d8+Si0rIM4IlakUOgXVHYpSnD orAIlR8SeB8SaTZBp8kTe/YT2OJAhnruhmY760XqRtXdMCRl3Yi1X+fbY3dYsm2MGrT8 UDMwXoURgfylEFUVMerXbMlzeWRXe9jcRMqoN0q1/L8uUne1+3+oU2yFqkEi6yJ60RNR ReVw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id we5-20020a170907234500b00886de65e971si4439102ejb.698.2023.01.30.04.52.47; Mon, 30 Jan 2023 04:53:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235868AbjA3MhT (ORCPT + 99 others); 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) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756452011232129232?= X-GMAIL-MSGID: =?utf-8?q?1756452031843093438?= 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)