diff options
Diffstat (limited to 'drivers/vfio/vfio.c')
-rw-r--r-- | drivers/vfio/vfio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c index acb7121a9316..6d78736563de 100644 --- a/drivers/vfio/vfio.c +++ b/drivers/vfio/vfio.c | |||
@@ -1360,7 +1360,7 @@ static const struct file_operations vfio_device_fops = { | |||
1360 | */ | 1360 | */ |
1361 | static char *vfio_devnode(struct device *dev, umode_t *mode) | 1361 | static char *vfio_devnode(struct device *dev, umode_t *mode) |
1362 | { | 1362 | { |
1363 | if (MINOR(dev->devt) == 0) | 1363 | if (mode && (MINOR(dev->devt) == 0)) |
1364 | *mode = S_IRUGO | S_IWUGO; | 1364 | *mode = S_IRUGO | S_IWUGO; |
1365 | 1365 | ||
1366 | return kasprintf(GFP_KERNEL, "vfio/%s", dev_name(dev)); | 1366 | return kasprintf(GFP_KERNEL, "vfio/%s", dev_name(dev)); |