diff options
author | Minghao Chi <chi.minghao@zte.com.cn> | 2022-01-18 07:52:52 +0000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2022-05-04 19:37:45 +1000 |
commit | e9bb94cde12d14e460b954f468af1200856564cf (patch) | |
tree | f80202bbac5a8786020391c25779970e5c278d77 /drivers/macintosh/ams | |
parent | 9d021a2149b8804627d04a9aceec60b24e384f11 (diff) | |
download | lwn-e9bb94cde12d14e460b954f468af1200856564cf.tar.gz lwn-e9bb94cde12d14e460b954f468af1200856564cf.zip |
macintosh/ams: Remove unneeded result variable
Return the value from i2c_add_driver() directly instead of storing it 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>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220118075252.925616-1-chi.minghao@zte.com.cn
Diffstat (limited to 'drivers/macintosh/ams')
-rw-r--r-- | drivers/macintosh/ams/ams-i2c.c | 6 |
1 files changed, 1 insertions, 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); } |