net/mlx5: fix using flow tunnel before null check
authorYunjian Wang <wangyunjian@huawei.com>
Sat, 27 Mar 2021 02:44:09 +0000 (10:44 +0800)
committerRaslan Darawsheh <rasland@nvidia.com>
Wed, 31 Mar 2021 07:16:17 +0000 (09:16 +0200)
commited9726ce83eb7562b3dcfaf0ee10647ed816ae4a
treeff3843dace8bbbfbc83f1fea1244aea892d136cd
parentb83d270dff3852f1df0ea9bea5a8740378db0c7c
net/mlx5: fix using flow tunnel before null check

Coverity flags that 'ctx->tunnel' variable is used before
it's checked for NULL. This patch fixes this issue.

Coverity issue: 366201
Fixes: 868d2e342cf3 ("net/mlx5: fix tunnel offload hub multi-thread protection")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/mlx5_flow.c