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)
commit0a0ab1d2cc5d5e68191488235074b5b30d793bb7
tree66ca6ddc708ff268bafa2468bf1f043a072b7dde
parent0f6e4cf67411631be7f010fdb5c2d82c0c8705c0
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