summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-06-07 16:28:46 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-06-07 16:28:46 -0700
commit5125ed5b5438ab534df9bfc309dd556781c4ec9b (patch)
tree243b24b8c34b707022150286bfffce661a7d37dd
parentb8e9dbacdd60c5a20ab2c77c08f047b2b990f303 (diff)
parent9a6aa279d3d17af73a029fa40654e92f4e75e8bb (diff)
downloadlinux-5125ed5b5438ab534df9bfc309dd556781c4ec9b.tar.gz
linux-5125ed5b5438ab534df9bfc309dd556781c4ec9b.tar.xz
Merge tag 'vfio-v3.10-rc5' of git://github.com/awilliam/linux-vfio
Pull vfio fix from Alex Williamson: "fix rmmod crash" * tag 'vfio-v3.10-rc5' of git://github.com/awilliam/linux-vfio: vfio: fix crash on rmmod
-rw-r--r--drivers/vfio/vfio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c
index acb7121..6d78736 100644
--- a/drivers/vfio/vfio.c
+++ b/drivers/vfio/vfio.c
@@ -1360,7 +1360,7 @@ static const struct file_operations vfio_device_fops = {
*/
static char *vfio_devnode(struct device *dev, umode_t *mode)
{
- if (MINOR(dev->devt) == 0)
+ if (mode && (MINOR(dev->devt) == 0))
*mode = S_IRUGO | S_IWUGO;
return kasprintf(GFP_KERNEL, "vfio/%s", dev_name(dev));