net: thunder: Check for driver data in nicvf_remove()
authorPavel Fedin <p.fedin@samsung.com>
Mon, 16 Nov 2015 14:51:34 +0000 (17:51 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Dec 2015 05:25:36 +0000 (21:25 -0800)
commit55e483212e6e42a1aca9223e2cc2b48275572031
tree78cdc56dda3abdb756b290ba7eef26be3de84352
parent8f1a7ed477827f6a91c2d0115a8281298d6c5294
net: thunder: Check for driver data in nicvf_remove()

[ Upstream commit 7750130d93decff06120df0d8ea024ff8a038a21 ]

In some cases the crash is caused by nicvf_remove() being called from
outside. For example, if we try to feed the device to vfio after the
probe has failed for some reason. So, move the check to better place.

Signed-off-by: Pavel Fedin <p.fedin@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/cavium/thunder/nicvf_main.c