aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2014-04-14 06:55:38 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-27 16:40:51 -0400
commit8283b4919e00fb110ac338d6b9984ca92d5030fa (patch)
tree3b8f95f677972af401d715ef9e5e24bbead2b475 /drivers
parent1bb6c08abfb653ce6e65d8ab4ddef403227afedf (diff)
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')
-rw-r--r--drivers/iommu/exynos-iommu.c7
-rw-r--r--drivers/vfio/vfio.c8
2 files changed, 2 insertions, 13 deletions
diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c
index 074018979cdf..b97a6ab95a9d 100644
--- a/drivers/iommu/exynos-iommu.c
+++ b/drivers/iommu/exynos-iommu.c
@@ -542,12 +542,7 @@ static int exynos_sysmmu_probe(struct platform_device *pdev)
542 goto err_alloc; 542 goto err_alloc;
543 } 543 }
544 544
545 ret = dev_set_drvdata(dev, data); 545 dev_set_drvdata(dev, data);
546 if (ret) {
547 dev_dbg(dev, "Unabled to initialize driver data\n");
548 goto err_init;
549 }
550
551 data->nsfrs = pdev->num_resources / 2; 546 data->nsfrs = pdev->num_resources / 2;
552 data->sfrbases = kmalloc(sizeof(*data->sfrbases) * data->nsfrs, 547 data->sfrbases = kmalloc(sizeof(*data->sfrbases) * data->nsfrs,
553 GFP_KERNEL); 548 GFP_KERNEL);
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,
349 void *device_data) 349 void *device_data)
350{ 350{
351 struct vfio_device *device; 351 struct vfio_device *device;
352 int ret;
353 352
354 device = kzalloc(sizeof(*device), GFP_KERNEL); 353 device = kzalloc(sizeof(*device), GFP_KERNEL);
355 if (!device) 354 if (!device)
@@ -360,12 +359,7 @@ struct vfio_device *vfio_group_create_device(struct vfio_group *group,
360 device->group = group; 359 device->group = group;
361 device->ops = ops; 360 device->ops = ops;
362 device->device_data = device_data; 361 device->device_data = device_data;
363 362 dev_set_drvdata(dev, device);
364 ret = dev_set_drvdata(dev, device);
365 if (ret) {
366 kfree(device);
367 return ERR_PTR(ret);
368 }
369 363
370 /* No need to get group_lock, caller has group reference */ 364 /* No need to get group_lock, caller has group reference */
371 vfio_group_get(group); 365 vfio_group_get(group);