diff options
| -rw-r--r-- | drivers/vfio/vfio.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c index 9591e2b509d7..0b025d58de81 100644 --- a/drivers/vfio/vfio.c +++ b/drivers/vfio/vfio.c | |||
| @@ -416,8 +416,9 @@ static void vfio_device_release(struct kref *kref) | |||
| 416 | /* Device reference always implies a group reference */ | 416 | /* Device reference always implies a group reference */ |
| 417 | static void vfio_device_put(struct vfio_device *device) | 417 | static void vfio_device_put(struct vfio_device *device) |
| 418 | { | 418 | { |
| 419 | struct vfio_group *group = device->group; | ||
| 419 | kref_put(&device->kref, vfio_device_release); | 420 | kref_put(&device->kref, vfio_device_release); |
| 420 | vfio_group_put(device->group); | 421 | vfio_group_put(group); |
| 421 | } | 422 | } |
| 422 | 423 | ||
| 423 | static void vfio_device_get(struct vfio_device *device) | 424 | static void vfio_device_get(struct vfio_device *device) |
