net/vdev_netvsc: fix device cast
authorStephen Hemminger <stephen@networkplumber.org>
Wed, 13 Mar 2019 02:12:53 +0000 (19:12 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 29 Mar 2019 16:25:31 +0000 (17:25 +0100)
commitcc7cd517b1a26f284112a5d6e5f40d6c63584930
tree2d09d67aebd26c26674398a7c7526d190abac47c
parentc9e37832c95f05086c38b6ad5bd2dec0a03ea881
net/vdev_netvsc: fix device cast

The return value from bus->find_device is a rte_device
which is not safe to cast to a rte_vdev_device structure.
It doesn't really matter since only being checked for NULL
but static checkers might find a bug here.

Fixes: 56252de779a6 ("net/vdev_netvsc: add automatic probing")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Matan Azrad <matan@mellanox.com>
drivers/net/vdev_netvsc/vdev_netvsc.c