crypto/nx/nx-842: dev_set_drvdata can no longer fail
authorJean Delvare <jdelvare@suse.de>
Wed, 28 May 2014 12:02:24 +0000 (14:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 May 2014 20:39:51 +0000 (13:39 -0700)
Don't check if dev_set_drvdata() failed, it can't, and it returns void
now.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Robert Jennings <rcj@linux.vnet.ibm.com>
Cc: Marcelo Henrique Cerri <mhcerri@linux.vnet.ibm.com>
Cc: Fionnuala Gunter <fin@linux.vnet.ibm.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/crypto/nx/nx-842.c

index 1e5481d88a262c655aec0d381574341531f5f4ae..5ce8b576512106656fc9d38571a36107d9f3f2bc 100644 (file)
@@ -1197,12 +1197,7 @@ static int __init nx842_probe(struct vio_dev *viodev,
        }
 
        rcu_read_lock();
-       if (dev_set_drvdata(&viodev->dev, rcu_dereference(devdata))) {
-               rcu_read_unlock();
-               dev_err(&viodev->dev, "failed to set driver data for device\n");
-               ret = -1;
-               goto error;
-       }
+       dev_set_drvdata(&viodev->dev, rcu_dereference(devdata));
        rcu_read_unlock();
 
        if (sysfs_create_group(&viodev->dev.kobj, &nx842_attribute_group)) {