From nobody Fri Apr 17 10:36:01 2026 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 6FC65C433FE for ; Thu, 17 Nov 2022 13:53:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240240AbiKQNxs (ORCPT ); Thu, 17 Nov 2022 08:53:48 -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: quoted-printable 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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/n= et/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 *spar= x5) =20 int sparx5_qos_init(struct sparx5 *sparx5) { - int ret; - - ret =3D sparx5_leak_groups_init(sparx5); - if (ret < 0) - return ret; - - return 0; + return sparx5_leak_groups_init(sparx5); } =20 int sparx5_tc_mqprio_add(struct net_device *ndev, u8 num_tc) --=20 2.31.1