From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EE1EFC4332F for ; Thu, 17 Nov 2022 13:55:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=sG4CRPzDCMoiJeGqrN0H9sa0Xom1/pYumWAOUrfMsHw=; b=AfhPskI+x7Q4NT ZHckjBfIxATU1iS6cAYhFo2PyHS+Hn5uVhEo/+Oq6Ve2qv0/Q62Fqa/TA8e4yjWNGBVswxmlvfnc0 yy7uBebwAj92BFyOzhns6HwsuawLliFe2Vz4jMgnDx1GTCIeA/lcXETaIeGOuba2aGN9bSmtKVX2u W0ZitatqBgV6o6011JtcFpRWVlmUSB0CVSaSz2yfrnfX1nNfYHMPMnHZiDZEBucSz9iF2OZUrw5II 2MSY1jzv7UXOJpBKSL8/lC9Sk3TeshfcEBt/e5lGen1mJ0HjVGiWanMaUbZehzRcXY/pmCvMurEfo 4gpKmBO5N6eS1gNqeTAA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovfKx-00Ed30-HB; Thu, 17 Nov 2022 13:53:51 +0000 Received: from szxga01-in.huawei.com ([45.249.212.187]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovfKr-00EcvO-Uk for linux-arm-kernel@lists.infradead.org; Thu, 17 Nov 2022 13:53:48 +0000 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 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221117_055346_192765_2401C0AB X-CRM114-Status: UNSURE ( 8.39 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel