[PATCH -next] mlxsw: spectrum_acl_tcam: simplify the return expression of ishtp_cl_driver_register()

From: Qinglang Miao
Date: Mon Sep 21 2020 - 09:13:07 EST


Simplify the return expression.

Signed-off-by: Qinglang Miao <miaoqinglang@xxxxxxxxxx>
---
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