DORMANTno replies LANDED

Landed in mainline as e9bb94cde12d on 2022-05-04.

[PATCH] drivers/macintosh/ams: remove unneeded result variable

From: <hidden>
Date: 2022-01-18 07:53:07
Also in: lkml
Subsystem: linux for power macintosh, the rest · Maintainer: Linus Torvalds

From: Minghao Chi <redacted>

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

Reported-by: Zeal Robot <redacted>
Signed-off-by: Minghao Chi <redacted>
Signed-off-by: CGEL ZTE <redacted>
---
 drivers/macintosh/ams/ams-i2c.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/macintosh/ams/ams-i2c.c b/drivers/macintosh/ams/ams-i2c.c
index 21271b2e9259..d2f0cde6f9c7 100644
--- a/drivers/macintosh/ams/ams-i2c.c
+++ b/drivers/macintosh/ams/ams-i2c.c
@@ -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);
 }
-- 
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help