aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/vfio
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/vfio')
-rw-r--r--drivers/vfio/vfio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c
index 3b7fa7967221..12c264d3b058 100644
--- a/drivers/vfio/vfio.c
+++ b/drivers/vfio/vfio.c
@@ -465,8 +465,9 @@ static int vfio_dev_viable(struct device *dev, void *data)
465{ 465{
466 struct vfio_group *group = data; 466 struct vfio_group *group = data;
467 struct vfio_device *device; 467 struct vfio_device *device;
468 struct device_driver *drv = ACCESS_ONCE(dev->driver);
468 469
469 if (!dev->driver || vfio_whitelisted_driver(dev->driver)) 470 if (!drv || vfio_whitelisted_driver(drv))
470 return 0; 471 return 0;
471 472
472 device = vfio_group_get_device(group, dev); 473 device = vfio_group_get_device(group, dev);