Skip to contentSkip to conversation

drivers/macintosh/ams: remove unneeded result variable

PATCH New [email protected] 1 participant 1 message Jan 18, 2022 Linux for power macintosh

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/macintosh/ams: remove unneeded result variable

From: Minghao Chi <[email protected]>

Return value from i2c_add_driver() directly instead of taking this in another redundant variable.

---
 drivers/macintosh/ams/ams-i2c.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/macintosh/ams/ams-i2c.c +1 -5
index 21271b2e9259..d2f0cde6f9c7 100644
@@ -256,8 +256,6 @@ static void ams_i2c_exit(void)
 
 int __init ams_i2c_init(struct device_node *np)
 {
-	int result;
-
 	/* Set implementation stuff */
 	ams_info.of_node = np;
 	ams_info.exit = ams_i2c_exit;
@@ -266,7 +264,5 @@ int __init ams_i2c_init(struct device_node *np)
 	ams_info.clear_irq = ams_i2c_clear_irq;
 	ams_info.bustype = BUS_I2C;
 
-	result = i2c_add_driver(&ams_i2c_driver);
-
-	return result;
+	return i2c_add_driver(&ams_i2c_driver);
 }
Signature · 1 line
2.25.1