* [PATCH] drivers/macintosh/ams: remove unneeded result variable
@ 2022-01-18 7:52 ` cgel.zte
0 siblings, 0 replies; 2+ messages in thread
From: cgel.zte @ 2022-01-18 7:52 UTC (permalink / raw)
To: benh; +Cc: linuxppc-dev, linux-kernel, Minghao Chi, Zeal Robot, CGEL ZTE
From: Minghao Chi <chi.minghao@zte.com.cn>
Return value from i2c_add_driver() directly instead
of taking this in another redundant variable.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] drivers/macintosh/ams: remove unneeded result variable
@ 2022-01-18 7:52 ` cgel.zte
0 siblings, 0 replies; 2+ messages in thread
From: cgel.zte @ 2022-01-18 7:52 UTC (permalink / raw)
To: benh; +Cc: CGEL ZTE, Zeal Robot, linuxppc-dev, linux-kernel, Minghao Chi
From: Minghao Chi <chi.minghao@zte.com.cn>
Return value from i2c_add_driver() directly instead
of taking this in another redundant variable.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-18 7:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-18 7:52 [PATCH] drivers/macintosh/ams: remove unneeded result variable cgel.zte
2022-01-18 7:52 ` cgel.zte
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.