diff options
author | Colin Ian King <colin.king@canonical.com> | 2018-11-22 13:05:01 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-24 04:22:02 +0300 |
commit | e159e592872edc0536f55ec242dbc5b70a593265 (patch) | |
tree | 506b7ee61c3e681b8633d3c386ac55f873d4007f /drivers/net/ethernet/marvell/octeontx2/af/cgx.h | |
parent | b0c4b041e37c7972f42349cb75a1dab68f234b5b (diff) | |
download | linux-e159e592872edc0536f55ec242dbc5b70a593265.tar.xz |
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: 4a61abb100c8 ("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>
Diffstat (limited to 'drivers/net/ethernet/marvell/octeontx2/af/cgx.h')
0 files changed, 0 insertions, 0 deletions