linux_dsm_epyc7002/drivers/net/ethernet/huawei
Colin Ian King e159e59287 net: hinic: fix null pointer dereference on pointer hwdev
Pointer hwdev is being dereferenced when declaring hwif , however, later
on hwdev is being null checked, hence we have dereference before null
check error. Fix this by assigning hwif and pdef only once hwdev has
been null checked.

Detected by CoverityScan, CID#1485581 ("Dereference before null check")

Fixes: 4a61abb100 ("net-next/hinic:add rx checksum offload for HiNIC")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-23 17:22:02 -08:00
..
hinic net: hinic: fix null pointer dereference on pointer hwdev 2018-11-23 17:22:02 -08:00
Kconfig net-next/hinic: Initialize hw interface 2017-08-22 10:48:52 -07:00
Makefile net-next/hinic: Initialize hw interface 2017-08-22 10:48:52 -07:00