Skip to contentSkip to conversation

crypto/nx/nx-842: dev_set_drvdata can no longer fail

PATCH In review Jean Delvare 2 participants 3 messages May 28, 2014 – May 29, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto/nx/nx-842: dev_set_drvdata can no longer fail

Don't check if dev_set_drvdata() failed, it can't, and it returns void now.

Cc Greg Kroah-Hartman <[email protected]>
Cc Robert Jennings <[email protected]>
Cc Marcelo Henrique Cerri <[email protected]>
Cc Fionnuala Gunter <[email protected]>

---
I believe this should go through Greg's driver-core tree, as this is where the rest of the dev_set_drvdata() changes are.

 drivers/crypto/nx/nx-842.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/crypto/nx/nx-842.c +1 -6
@@ -1197,12 +1197,7 @@ static int __init nx842_probe(struct vio
 	}
 
 	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)) {
Signature · 2 lines
Jean Delvare
SUSE L3 Support
#1 lore raw
Quoted 11 lines · Jean Delvare

Don't check if dev_set_drvdata() failed, it can't, and it returns void now.

Cc Greg Kroah-Hartman <[email protected]>
Cc Robert Jennings <[email protected]>
Cc Marcelo Henrique Cerri <[email protected]>
Cc Fionnuala Gunter <[email protected]>

---
I believe this should go through Greg's driver-core tree, as this is where the rest of the dev_set_drvdata() changes are.

You forgot a reported-by: field :(

I'll add it but be more careful in the future...

greg k-h

#2 lore raw
Quoted 13 lines · Greg Kroah-Hartman
Quoted 11 lines · Jean Delvare

Don't check if dev_set_drvdata() failed, it can't, and it returns void now.

Cc Greg Kroah-Hartman <[email protected]>
Cc Robert Jennings <[email protected]>
Cc Marcelo Henrique Cerri <[email protected]>
Cc Fionnuala Gunter <[email protected]>

---
I believe this should go through Greg's driver-core tree, as this is where the rest of the dev_set_drvdata() changes are.

Quoted 3 lines

You forgot a reported-by: field :(

I'll add it but be more careful in the future...

Sorry, I'm not yet used to reported-by :-( I'll try to remember it next time.

Signature · 2 lines
Jean Delvare
SUSE L3 Support