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

net: hns3: fix null pointer dereference before null check



pointer ndev is being dereferenced with the call to netif_running
before it is being null checked.  Re-order the code to only dereference
ndev after it has been null checked.

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

Fixes: 9df8f79a ("net: hns3: Add DCB support when interacting with network stack")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 09af87d1
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