i40e: Fix to check for NULL
authorCarolyn Wyborny <carolyn.wyborny@intel.com>
Wed, 24 Aug 2016 18:33:50 +0000 (11:33 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 23 Sep 2016 05:33:39 +0000 (22:33 -0700)
commitd4a0658d813ec72965a52f04f07258a4018ccb17
treec022a69cc1f68ef1915863307918ccefb2ce6c43
parent8d9d927f4ab8d87fee91d9aa8bdcdf19a1787ce0
i40e: Fix to check for NULL

This patch fixes an issue in the virt channel code, where a return
from i40e_find_vsi_from_id was not checked for NULL when applicable.
Without this patch, there is a risk for panic and static analysis
tools complain. This patch fixes the problem by adding the check
and adding an additional input check for similar reasons.

Change-ID: I7e9be88eb7a3addb50eadc451c8336d9e06f5394
Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c