diff options
author | Jean Delvare <jdelvare@suse.de> | 2014-04-14 12:55:38 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-27 22:40:51 +0200 |
commit | 8283b4919e00fb110ac338d6b9984ca92d5030fa (patch) | |
tree | 3b8f95f677972af401d715ef9e5e24bbead2b475 /drivers/vfio | |
parent | driver core: Move driver_data back to struct device (diff) | |
download | linux-8283b4919e00fb110ac338d6b9984ca92d5030fa.tar.xz linux-8283b4919e00fb110ac338d6b9984ca92d5030fa.zip |
driver core: dev_set_drvdata can no longer fail
So there is no point in checking its return value, which will soon
disappear.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/vfio')
-rw-r--r-- | drivers/vfio/vfio.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c index 512f479d8a50..f018d8d0f975 100644 --- a/drivers/vfio/vfio.c +++ b/drivers/vfio/vfio.c @@ -349,7 +349,6 @@ struct vfio_device *vfio_group_create_device(struct vfio_group *group, void *device_data) { struct vfio_device *device; - int ret; device = kzalloc(sizeof(*device), GFP_KERNEL); if (!device) @@ -360,12 +359,7 @@ struct vfio_device *vfio_group_create_device(struct vfio_group *group, device->group = group; device->ops = ops; device->device_data = device_data; - - ret = dev_set_drvdata(dev, device); - if (ret) { - kfree(device); - return ERR_PTR(ret); - } + dev_set_drvdata(dev, device); /* No need to get group_lock, caller has group reference */ vfio_group_get(group); |