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: Abaci Robot <abaci@linux.alibaba.com>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4174
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
Yang Li 2023-02-22 10:29:44 +08:00 committed by Saeed Mahameed
parent ac3ad19584
commit 0483a16bc4

View File

@ -710,8 +710,7 @@ forward:
else
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;