From: Shannon Nelson Date: Sat, 21 Feb 2015 06:45:28 +0000 (+0000) Subject: i40e: check pointers before use X-Git-Tag: MMI-PSA29.97-13-9~10520^2~31^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=65d13461d7c3fa822ff2000d2c0fe5f5b1943cb9;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git i40e: check pointers before use Make sure we don't try to dereference NULL pointers when returning values from the AdminQ calls. Change-ID: Ia6694f2f415d50acf0aba063c863568742799aff Signed-off-by: Shannon Nelson Tested-by: Jim Young Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c index 2a705a116227..6aea65dae5ed 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_common.c +++ b/drivers/net/ethernet/intel/i40e/i40e_common.c @@ -2847,7 +2847,7 @@ i40e_status i40e_aq_add_udp_tunnel(struct i40e_hw *hw, status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); - if (!status) + if (!status && filter_index) *filter_index = resp->index; return status;