Commit 0483a16b authored by Yang Li's avatar Yang Li Committed by Saeed Mahameed

net/mlx5: Remove NULL check before dev_{put, hold}

The call netdev_{put, hold} of dev_{put, hold} will check NULL,
so there is no need to check before using dev_{put, hold},
remove it to silence the warning:

./drivers/net/ethernet/mellanox/mlx5/core/en/rep/tc.c:714:2-9: WARNING: NULL check before dev_{put, hold} functions is not needed.
Reported-by: default avatarAbaci Robot <abaci@linux.alibaba.com>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4174Signed-off-by: default avatarYang Li <yang.lee@linux.alibaba.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent ac3ad195
...@@ -710,7 +710,6 @@ void mlx5e_rep_tc_receive(struct mlx5_cqe64 *cqe, struct mlx5e_rq *rq, ...@@ -710,7 +710,6 @@ void mlx5e_rep_tc_receive(struct mlx5_cqe64 *cqe, struct mlx5e_rq *rq,
else else
napi_gro_receive(rq->cq.napi, skb); napi_gro_receive(rq->cq.napi, skb);
if (tc_priv.fwd_dev)
dev_put(tc_priv.fwd_dev); dev_put(tc_priv.fwd_dev);
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment