i40e: Fix static checker warning
authorNeerav Parikh <Neerav.Parikh@intel.com>
Thu, 6 Feb 2014 05:51:11 +0000 (05:51 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 7 Mar 2014 02:41:50 +0000 (18:41 -0800)
commit71f6a85a5881b30ba80d3dac5173f1a6c55c8ccf
treef0851a2e248a51e0bcd3513acca37265c68c3999
parent6982d429a9194e5069c5249e751422def87658a6
i40e: Fix static checker warning

This patch fixes the following static checker warning:

  drivers/net/ethernet/intel/i40e/i40e_dcb.c:342
  i40e_lldp_to_dcb_config() warn: 'tlv' can't be NULL.

Exit criteria from the while loop is encountering LLDP END
LV or if the TLV length goes beyond the buffer length.

Change-ID: I7548b16db90230ec2ba0fa791b0343ca8b7dd5bb
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Neerav Parikh <Neerav.Parikh@intel.com>
Acked-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Kevin Scott <kevin.c.scott@intel.com>
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Tested-By: Jack Morgan<jack.morgan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_dcb.c