So there is no point in checking its return value, which will soon
disappear.

Signed-off-by: Jean Delvare <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
---
 drivers/iommu/exynos-iommu.c |    7 +------
 drivers/vfio/vfio.c          |    8 +-------
 2 files changed, 2 insertions(+), 13 deletions(-)

--- linux-3.15-rc0.orig/drivers/iommu/exynos-iommu.c    2014-04-08 
16:23:59.159885163 +0200
+++ linux-3.15-rc0/drivers/iommu/exynos-iommu.c 2014-04-08 16:25:47.491199974 
+0200
@@ -542,12 +542,7 @@ static int exynos_sysmmu_probe(struct pl
                goto err_alloc;
        }
 
-       ret = dev_set_drvdata(dev, data);
-       if (ret) {
-               dev_dbg(dev, "Unabled to initialize driver data\n");
-               goto err_init;
-       }
-
+       dev_set_drvdata(dev, data);
        data->nsfrs = pdev->num_resources / 2;
        data->sfrbases = kmalloc(sizeof(*data->sfrbases) * data->nsfrs,
                                                                GFP_KERNEL);
--- linux-3.15-rc0.orig/drivers/vfio/vfio.c     2014-04-08 16:23:59.159885163 
+0200
+++ linux-3.15-rc0/drivers/vfio/vfio.c  2014-04-08 16:28:14.690345108 +0200
@@ -349,7 +349,6 @@ struct vfio_device *vfio_group_create_de
                                             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_de
        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);

-- 
Jean Delvare
SUSE L3 Support
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to