]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: E-Switch, Avoid redundant memory allocation
authorEli Cohen <eli@mellanox.com>
Tue, 28 Feb 2017 22:52:21 +0000 (16:52 -0600)
committerSaeed Mahameed <saeedm@mellanox.com>
Sun, 30 Apr 2017 13:03:21 +0000 (16:03 +0300)
commit5a879d0dc9b1f0db5127bda41b88581ac0d4d49a
tree66ca6ddc708ff268bafa2468bf1f043a072b7dde
parentf12536ed43e2c9cfefdbe450e866ed234c623b4b
net/mlx5: E-Switch, Avoid redundant memory allocation

struct esw_mc_addr is a small struct that can be part of struct
mlx5_eswitch. Define it as a field and not as a pointer and save the
kzalloc call and then error flow handling.

Signed-off-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h