Re: [PATCH] net: hns3: fix null pointer dereference before null check

2017-09-30 Thread David Miller
From: Colin King Date: Fri, 29 Sep 2017 20:51:23 +0100 > From: Colin Ian King > > 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

Re: [PATCH] net: hns3: fix null pointer dereference before null check

2017-09-29 Thread Yunsheng Lin
Hi, Colin On 2017/9/30 3:51, Colin King wrote: > From: Colin Ian King > > 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. Thanks for fixing it. > > Detected by Co

[PATCH] net: hns3: fix null pointer dereference before null check

2017-09-29 Thread Colin King
From: Colin Ian King 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: 9df8f79a4d29 ("net: