net/ice/base: resolve static analysis issues
authorQi Zhang <qi.z.zhang@intel.com>
Thu, 29 Aug 2019 02:36:11 +0000 (10:36 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 7 Oct 2019 13:00:53 +0000 (15:00 +0200)
commit2db7c617f660b9e1cfd3a7bae9696f190d9a73ab
tree33eed83c03fa591fed45823b9a8e31379a1250d3
parent9467486f179f584dfc95c877b8e8f370be80b500
net/ice/base: resolve static analysis issues

Coverity complains first_free can be -1 resulting in a negative shift left
when k equals 0; i.e. the expression 1 << (first_free - k). Fix this by
explicitly checking for this case.

Cc: stable@dpdk.org
Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
drivers/net/ice/base/ice_flex_pipe.c