Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3136794pxk; Mon, 21 Sep 2020 06:15:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyInr0aEd0d7p4PTHbDRCYl//f8JBsDIqrzrXh8O+UrowKKIZsA5Xp+9xGlvIZk3oOzsXwe X-Received: by 2002:aa7:c444:: with SMTP id n4mr52401266edr.200.1600694129135; Mon, 21 Sep 2020 06:15:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600694129; cv=none; d=google.com; s=arc-20160816; b=VT/1QhCNKDw6Bf+lPKeRZONl4TinEBScUm7MrKHBEAZEKo3NxYoCLAiNu5QHHI9Wra vA33fFq2HWPTw5Q0qIH1dwKiDOKmZadizabgsSzZ6NUaKbjy/9YMjSvX5S8iYRilAsY4 aQDYZw/Yi//g1Ky/6QnvxoD2VpH4tn/at5zumTMog4Ovi4XUSziJcKjj4Sg4eSsoUGYe SdM52MDABE0G0ZTUcmV6Z9wCo+0PgSS/7jM/bvbWBsrMRSsxdHyKMOBlYdkBJ8x0we5E qOtEA7X59xx1rsO36UIYpYHLfY4eUE1XEvmZCfpNATOwRV24fIerLIzpv7zZlSOHJOw/ 0Dww== 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:cc:to:from; bh=gEF9HSvtWen1Ara+dv/O3536Qo31rwYELyut9VPQfLM=; b=O5f0hWbw1ZtW6kHooUHdUQZi/cMXJQsFPoCPpHweox9Aure77Wiu+KndydPBcTfzd8 4K8qQ55fSs1MDKz2c+bEe2mYXCjvV9preVVxqSjYEhfmhPfhoEe8cGkSekA4vvCrOfRH t1gIW3sU19mveDx0TnWtdzpUjRPX7IlxFi8BKvEhsjhjZW1A+Rq0l6oMQ/Ypsxb8sBI0 JwGp3lXD5VUB2s4zn/wB9FwmzVw2lfJ/CE+b4oX0GPr3g3VmotZj599SrdkoTX0ayZ0r ei/pWKkjj3jlYkGjZ+k3D5xs+0iV2R2tSB2uWal19D92bRw5TOUSTRcGqGkScgDkToMt UhDA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c3si7733742edr.295.2020.09.21.06.15.03; Mon, 21 Sep 2020 06:15:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727344AbgIUNKa (ORCPT + 99 others); Mon, 21 Sep 2020 09:10:30 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:13804 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727331AbgIUNK2 (ORCPT ); Mon, 21 Sep 2020 09:10:28 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id C9984B85D2801ABBABC2; Mon, 21 Sep 2020 21:10:26 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.487.0; Mon, 21 Sep 2020 21:10:16 +0800 From: Qinglang Miao To: Jiri Pirko , Ido Schimmel CC: "David S. Miller" , Jakub Kicinski , , , Qinglang Miao Subject: [PATCH -next] mlxsw: spectrum_router: simplify the return expression of __mlxsw_sp_router_init() Date: Mon, 21 Sep 2020 21:10:41 +0800 Message-ID: <20200921131041.92294-1-miaoqinglang@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Simplify the return expression. Signed-off-by: Qinglang Miao --- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c index 24f1fd1f8..9188fc32b 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c @@ -8033,7 +8033,6 @@ static int __mlxsw_sp_router_init(struct mlxsw_sp *mlxsw_sp) bool usp = net->ipv4.sysctl_ip_fwd_update_priority; char rgcr_pl[MLXSW_REG_RGCR_LEN]; u64 max_rifs; - int err; if (!MLXSW_CORE_RES_VALID(mlxsw_sp->core, MAX_RIFS)) return -EIO; @@ -8042,10 +8041,7 @@ static int __mlxsw_sp_router_init(struct mlxsw_sp *mlxsw_sp) mlxsw_reg_rgcr_pack(rgcr_pl, true, true); mlxsw_reg_rgcr_max_router_interfaces_set(rgcr_pl, max_rifs); mlxsw_reg_rgcr_usp_set(rgcr_pl, usp); - err = mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(rgcr), rgcr_pl); - if (err) - return err; - return 0; + return mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(rgcr), rgcr_pl); } static void __mlxsw_sp_router_fini(struct mlxsw_sp *mlxsw_sp) -- 2.23.0