diff mbox

[RFC,17/37] cbus: retu: don't assing ret inside the if ()

Message ID 1270656268-7034-18-git-send-email-felipe.balbi@nokia.com (mailing list archive)
State Accepted, archived
Delegated to: Tony Lindgren
Headers show

Commit Message

Felipe Balbi April 7, 2010, 4:04 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/cbus/retu.c b/drivers/cbus/retu.c
index ae2e691..8382694 100644
--- a/drivers/cbus/retu.c
+++ b/drivers/cbus/retu.c
@@ -354,7 +354,8 @@  static int __devinit retu_probe(struct device *dev)
 		return -ENODEV;
 	}
 
-	if ((ret = gpio_request(retu_irq_pin, "RETU irq")) < 0) {
+	ret = gpio_request(retu_irq_pin, "RETU irq");
+	if (ret < 0) {
 		printk(KERN_ERR PFX "Unable to reserve IRQ GPIO\n");
 		return ret;
 	}
@@ -453,13 +454,16 @@  static int __init retu_init(void)
 
 	init_completion(&device_release);
 
-	if ((ret = driver_register(&retu_driver)) < 0)
+	ret = driver_register(&retu_driver);
+	if (ret < 0)
 		return ret;
 
-	if ((ret = platform_device_register(&retu_device)) < 0) {
+	ret = platform_device_register(&retu_device);
+	if (ret < 0) {
 		driver_unregister(&retu_driver);
 		return ret;
 	}
+
 	return 0;
 }