]> 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)
commit5aafe0f5e158e2d0ea3ba10f22d74482a87eb101
tree66ca6ddc708ff268bafa2468bf1f043a072b7dde
parentdf85ed4be50b9628ab936716c1ed55f48adc7283
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