Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2093626rwb; Thu, 17 Nov 2022 06:30:39 -0800 (PST) X-Google-Smtp-Source: AA0mqf4kwTM6OdRAU5NMMBb7whaLEdkYyuFGVMsoTvPv2C36NYeY0CnOE6pMSO2NLlzS9nz2QUQI X-Received: by 2002:a17:902:eb8b:b0:188:d3ea:17aa with SMTP id q11-20020a170902eb8b00b00188d3ea17aamr3062763plg.32.1668695438980; Thu, 17 Nov 2022 06:30:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668695438; cv=none; d=google.com; s=arc-20160816; b=vmi7fz48o6xfwtlMLbG8+GxXGkzXy2HBG76fr62o58RvCbltpgzgV0yDG6IFypU81/ Z2KJE0b8RUgsPRT2UO2LPuB18uUI1JIacFvVdn/W+jUOi5ixLX+d7COsTzaft2Hvxs9R CYrQu6ATXsFA5coarDfB+OFuxJ47+AloABLdOOs0KMF7YyJ1Sf3Ha9kAy3Tb4vdkCk9I /LYrmLE0Tx7bjYFEbH6uzM1QJps3fXfMkXQhMozBvfFFkiTkM7tLW3xFwbuIKNSugmTd unBmh80Pq1S3C+bj7j8BdPSM+3HgeXOemFe/O7+BffiKdkZD9xz1wamFCs3qToo8fRgj yt8Q== 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 :message-id:date:subject:to:from; bh=f3BQjm65hjLLU6fGk4k+MfSIyJ4PyVlpKGfkm8XTuDc=; b=qoXaaeuRDnrXW9h8tiTU+J6g747l5dxI2oqkAvbArbfaiJOUAjBPDgBjKbcBzIL2gr ftt/9mNFr9t0EYc6yMd4Nx0ia3F5yRKKBD9VHdqA8flTbL6PQn4ClTE9L8qaj/dzOXvQ tK4/i4k6bLdnSpHcIvReFNAHVo+DblwFSgjy0IfEe+xkLOo8Dfytyxj0Zu3dx7rGLzFc rJ8JopiHhoBjWeaHRl/uLiQuRAeHm47cX02s12pQZVJuYd4kiry9EDZuafjGwgZHGO/R ejy9RSDZn2CHHQoWHOpvaqlAHeCOV4P70r3BuZFRJ+12vTpuSAnpA5gD6I1ofy2SElhP Jp/w== 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 2-20020a630b02000000b0043c474c8942si1014411pgl.673.2022.11.17.06.30.26; Thu, 17 Nov 2022 06:30:38 -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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240218AbiKQNxq (ORCPT + 92 others); Thu, 17 Nov 2022 08:53:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240211AbiKQNxl (ORCPT ); Thu, 17 Nov 2022 08:53:41 -0500 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D63E11805; Thu, 17 Nov 2022 05:53:37 -0800 (PST) Received: from kwepemi500015.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4NChFh0tmLzmVvV; Thu, 17 Nov 2022 21:53:12 +0800 (CST) Received: from huawei.com (10.175.101.6) by kwepemi500015.china.huawei.com (7.221.188.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 17 Nov 2022 21:53:35 +0800 From: Lu Wei To: , , , , , , , , , , Subject: [patch net-next] net: microchip: sparx5: remove useless code in sparx5_qos_init() Date: Thu, 17 Nov 2022 22:58:20 +0800 Message-ID: <20221117145820.2898968-1-luwei32@huawei.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.101.6] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemi500015.china.huawei.com (7.221.188.92) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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 There is no need to define variable ret, so remove it and return sparx5_leak_groups_init() directly. Signed-off-by: Lu Wei --- drivers/net/ethernet/microchip/sparx5/sparx5_qos.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_qos.c b/drivers/net/ethernet/microchip/sparx5/sparx5_qos.c index 1e79d0ef0cb8..2f39300d52cc 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_qos.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_qos.c @@ -383,13 +383,7 @@ static int sparx5_leak_groups_init(struct sparx5 *sparx5) int sparx5_qos_init(struct sparx5 *sparx5) { - int ret; - - ret = sparx5_leak_groups_init(sparx5); - if (ret < 0) - return ret; - - return 0; + return sparx5_leak_groups_init(sparx5); } int sparx5_tc_mqprio_add(struct net_device *ndev, u8 num_tc) -- 2.31.1