net/i40e/base: fix using checksum before check
authorRobin Zhang <robinx.zhang@intel.com>
Sat, 9 Oct 2021 01:39:51 +0000 (01:39 +0000)
committerQi Zhang <qi.z.zhang@intel.com>
Sat, 9 Oct 2021 05:37:05 +0000 (07:37 +0200)
commite59d949182767cdf8c7ee1b2637034f50a8487fb
treebe6cd33554c626525aec4e61a0076e0fc9886200
parentbc99971d1021ecc85280b9b98e84c9b5f4ba008e
net/i40e/base: fix using checksum before check

The variable checksum from i40e_calc_nvm_checksum is used before return
value is checked. Fix this logic.

Fixes: 8db9e2a1b232 ("i40e: base driver")
Fixes: 3ed6c3246f43 ("i40e/base: handle AQ timeout when releasing NVM")
Cc: stable@dpdk.org
Signed-off-by: Christopher Pau <christopher.pau@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
drivers/net/i40e/base/i40e_nvm.c