Skip to content
Commit e159e592 authored by Colin Ian King's avatar Colin Ian King Committed by David S. Miller
Browse files

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: 4a61abb1 ("net-next/hinic:add rx checksum offload for HiNIC")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b0c4b041
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment