net/mlx5e: Set tx reporter only on successful creation
authorAya Levin <ayal@mellanox.com>
Mon, 24 Jun 2019 16:34:42 +0000 (19:34 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 1 Aug 2019 19:33:32 +0000 (12:33 -0700)
commitbaf6dfdb10e9695637d72429159fd26fc36d30c3
tree7ed36a52ba9c0808becefa32f8d1a5884ce29ee3
parent7f7cc235c2dfc2a9208a743492b80d6cdfee50a6
net/mlx5e: Set tx reporter only on successful creation

When failing to create tx reporter, don't set the reporter's pointer.
Creating a reporter is not mandatory for driver load, avoid
garbage/error pointer.

Signed-off-by: Aya Levin <ayal@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c
drivers/net/ethernet/mellanox/mlx5/core/en_main.c