net/virtio: fix crash when no devargs
authorHuawei Xie <huawei.xie@intel.com>
Mon, 13 Jun 2016 14:53:08 +0000 (22:53 +0800)
committerYuanhan Liu <yuanhan.liu@linux.intel.com>
Wed, 22 Jun 2016 07:47:12 +0000 (09:47 +0200)
commit7e40200c567ff798d7cd54085c3744cf3393ce66
treea384477b0fa1bb72dbe037d08ce718659477b9a7
parenta66bcad3224008f6fb89755c34533eb5fead166a
net/virtio: fix crash when no devargs

We skip kernel managed virtio devices, if it isn't whitelisted.
Before checking if the virtio device is whitelisted, check if devargs
is specified.

Fixes: ac5e1d838dc1 ("virtio: skip error when probing kernel managed device")

Reported-by: Vincent Li <vincent.mc.li@gmail.com>
Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
drivers/net/virtio/virtio_pci.c