diff options
author | Al Viro <viro@ZenIV.linux.org.uk> | 2014-11-20 08:15:38 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-11-21 14:58:18 -0500 |
commit | 914efb02befeedbd71a6f115c9d2fb38a34af04d (patch) | |
tree | ddb4ef0f13a23d8acd6e7de28488e02199203c02 | |
parent | 479163f4608214d18bc3266ab6e4b578897a3052 (diff) | |
download | talos-op-linux-914efb02befeedbd71a6f115c9d2fb38a34af04d.tar.gz talos-op-linux-914efb02befeedbd71a6f115c9d2fb38a34af04d.zip |
mlx4: don't duplicate kvfree()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/mr.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/mr.c b/drivers/net/ethernet/mellanox/mlx4/mr.c index 193a6adb5d04..d6f549685c0f 100644 --- a/drivers/net/ethernet/mellanox/mlx4/mr.c +++ b/drivers/net/ethernet/mellanox/mlx4/mr.c @@ -130,10 +130,7 @@ static int mlx4_buddy_init(struct mlx4_buddy *buddy, int max_order) err_out_free: for (i = 0; i <= buddy->max_order; ++i) - if (buddy->bits[i] && is_vmalloc_addr(buddy->bits[i])) - vfree(buddy->bits[i]); - else - kfree(buddy->bits[i]); + kvfree(buddy->bits[i]); err_out: kfree(buddy->bits); @@ -147,10 +144,7 @@ static void mlx4_buddy_cleanup(struct mlx4_buddy *buddy) int i; for (i = 0; i <= buddy->max_order; ++i) - if (is_vmalloc_addr(buddy->bits[i])) - vfree(buddy->bits[i]); - else - kfree(buddy->bits[i]); + kvfree(buddy->bits[i]); kfree(buddy->bits); kfree(buddy->num_free); |