net/i40e/base: fix division by zero
authorJingjing Wu <jingjing.wu@intel.com>
Sat, 10 Dec 2016 11:24:50 +0000 (19:24 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 17 Jan 2017 18:39:27 +0000 (19:39 +0100)
commit5a26067443621bf77e582be69b433540f7e657a8
tree1bc769107fcb0a5ba03e48bce95be5e8f2820a3c
parent842836682548f15ebceb37dd5b6176fcc45bd66a
net/i40e/base: fix division by zero

For some cases when reading from device are incorrect or image is
incorrect, this part of code causes crash due to division by zero.

Fixes: 8db9e2a1b232 ("i40e: base driver")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
drivers/net/i40e/base/i40e_common.c