diff options
author | Zheng Yongjun <zhengyongjun3@huawei.com> | 2020-12-09 04:20:02 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-12-10 06:20:46 +0300 |
commit | 016ade51a7d9c7b1408de0b0ba3c81f91d12bced (patch) | |
tree | 617a1913db5f951140c32509d6305d99acdc921f /drivers/net/ethernet/mellanox/mlx4/cq.c | |
parent | c2af62256e8d6f3c2f72f8678efde75423490c76 (diff) | |
download | linux-016ade51a7d9c7b1408de0b0ba3c81f91d12bced.tar.xz |
net/mlx4: simplify the return expression of mlx4_init_cq_table()
Simplify the return expression.
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/cq.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/cq.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/cq.c b/drivers/net/ethernet/mellanox/mlx4/cq.c index 3b8576b9c2f9..f7053a74e6a8 100644 --- a/drivers/net/ethernet/mellanox/mlx4/cq.c +++ b/drivers/net/ethernet/mellanox/mlx4/cq.c @@ -462,19 +462,14 @@ EXPORT_SYMBOL_GPL(mlx4_cq_free); int mlx4_init_cq_table(struct mlx4_dev *dev) { struct mlx4_cq_table *cq_table = &mlx4_priv(dev)->cq_table; - int err; spin_lock_init(&cq_table->lock); INIT_RADIX_TREE(&cq_table->tree, GFP_ATOMIC); if (mlx4_is_slave(dev)) return 0; - err = mlx4_bitmap_init(&cq_table->bitmap, dev->caps.num_cqs, - dev->caps.num_cqs - 1, dev->caps.reserved_cqs, 0); - if (err) - return err; - - return 0; + return mlx4_bitmap_init(&cq_table->bitmap, dev->caps.num_cqs, + dev->caps.num_cqs - 1, dev->caps.reserved_cqs, 0); } void mlx4_cleanup_cq_table(struct mlx4_dev *dev) |