[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200921131039.92249-1-miaoqinglang@huawei.com>
Date: Mon, 21 Sep 2020 21:10:39 +0800
From: Qinglang Miao <miaoqinglang@...wei.com>
To: Jiri Pirko <jiri@...dia.com>, Ido Schimmel <idosch@...dia.com>
CC: "David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, <netdev@...r.kernel.org>,
<linux-kernel@...r.kernel.org>,
Qinglang Miao <miaoqinglang@...wei.com>
Subject: [PATCH -next] mlxsw: spectrum_acl_tcam: simplify the return expression of ishtp_cl_driver_register()
Simplify the return expression.
Signed-off-by: Qinglang Miao <miaoqinglang@...wei.com>
---
drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c
index 5c0204033..5b4313991 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c
@@ -289,17 +289,11 @@ static int
mlxsw_sp_acl_tcam_group_add(struct mlxsw_sp_acl_tcam *tcam,
struct mlxsw_sp_acl_tcam_group *group)
{
- int err;
-
group->tcam = tcam;
mutex_init(&group->lock);
INIT_LIST_HEAD(&group->region_list);
- err = mlxsw_sp_acl_tcam_group_id_get(tcam, &group->id);
- if (err)
- return err;
-
- return 0;
+ return mlxsw_sp_acl_tcam_group_id_get(tcam, &group->id);
}
static void mlxsw_sp_acl_tcam_group_del(struct mlxsw_sp_acl_tcam_group *group)
--
2.23.0
Powered by blists - more mailing lists