net/mlx5e: TC, fix return value check in mlx5e_tc_act_stats_create()
authorYang Yingliang <yangyingliang@huawei.com>
Fri, 17 Feb 2023 03:13:01 +0000 (11:13 +0800)
committerSaeed Mahameed <saeedm@nvidia.com>
Fri, 24 Feb 2023 18:13:18 +0000 (10:13 -0800)
commitbfeda9683dcd697dc84bbd5ce375f659e9590bf5
tree3f6a4a749e9ca50424370a42e11723a5a8170c3a
parent0483a16bc493075bb9f6483497786fed41d27b94
net/mlx5e: TC, fix return value check in mlx5e_tc_act_stats_create()

kvzalloc() returns NULL pointer not PTR_ERR() when it fails,
so replace the IS_ERR() check with NULL pointer check.

Fixes: d13674b1d14c ("net/mlx5e: TC, map tc action cookie to a hw counter")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en/tc/act_stats.c