diff options
author | 2020-12-10 21:50:00 +0800 | |
---|---|---|
committer | 2020-12-10 13:00:51 -0800 | |
commit | b18cac546be3844471807e73b7e50e7f2ef7bf98 (patch) | |
tree | 55a8fc1354d4259a21f4851e95c10295488d3f45 /drivers/net | |
parent | net: stmmac: simplify the return tc_delete_knode() (diff) | |
download | linux-b18cac546be3844471807e73b7e50e7f2ef7bf98.tar.gz linux-b18cac546be3844471807e73b7e50e7f2ef7bf98.tar.bz2 linux-b18cac546be3844471807e73b7e50e7f2ef7bf98.zip |
net/mlx4: simplify the return expression of mlx4_init_srq_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')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/srq.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/srq.c b/drivers/net/ethernet/mellanox/mlx4/srq.c index cbe4d9746ddf..dd890f5d7b72 100644 --- a/drivers/net/ethernet/mellanox/mlx4/srq.c +++ b/drivers/net/ethernet/mellanox/mlx4/srq.c @@ -272,19 +272,14 @@ EXPORT_SYMBOL_GPL(mlx4_srq_query); int mlx4_init_srq_table(struct mlx4_dev *dev) { struct mlx4_srq_table *srq_table = &mlx4_priv(dev)->srq_table; - int err; spin_lock_init(&srq_table->lock); INIT_RADIX_TREE(&srq_table->tree, GFP_ATOMIC); if (mlx4_is_slave(dev)) return 0; - err = mlx4_bitmap_init(&srq_table->bitmap, dev->caps.num_srqs, - dev->caps.num_srqs - 1, dev->caps.reserved_srqs, 0); - if (err) - return err; - - return 0; + return mlx4_bitmap_init(&srq_table->bitmap, dev->caps.num_srqs, + dev->caps.num_srqs - 1, dev->caps.reserved_srqs, 0); } void mlx4_cleanup_srq_table(struct mlx4_dev *dev) |