[dpdk-dev,3/4] i40e_vsi_release: do not use vsi until after NULL check
Commit Message
Coverity: 127556
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/i40e/i40e_ethdev.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Comments
On 9/28/2016 8:20 PM, John W. Linville wrote:
> Coverity: 127556
>
> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
a few minor nits:
- patch subject tag/label should be "net/<driver>: ", so patch subject:
"net/i40e: do not use VSI until after NULL check"
- These are fixes, requires fixes line, for this patch:
Fixes: 440499cf5376 ("net/i40e: support floating VEB")
- For coverity fixes, defined usage is: "Coverity issue: XXXXX"
- Can be good to CC stable tree for these fixes.
Overall patch comment becomes something like:
"
net/i40e: do not use VSI until after NULL check
Coverity issue: 127556
Fixes: 440499cf5376 ("net/i40e: support floating VEB")
Signed-off-by: John W. Linville <linville@tuxdriver.com>
"
@@ -4097,11 +4097,13 @@ i40e_vsi_release(struct i40e_vsi *vsi)
void *temp;
int ret;
struct i40e_mac_filter *f;
- uint16_t user_param = vsi->user_param;
+ uint16_t user_param;
if (!vsi)
return I40E_SUCCESS;
+ user_param = vsi->user_param;
+
pf = I40E_VSI_TO_PF(vsi);
hw = I40E_VSI_TO_HW(vsi);