Revert "serial: max310x: pass return value of spi_register_driver"
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 May 2021 11:56:37 +0000 (13:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 May 2021 15:30:18 +0000 (17:30 +0200)
This reverts commit 51f689cc11333944c7a457f25ec75fcb41e99410.

Because of recent interactions with developers from @umn.edu, all
commits from them have been recently re-reviewed to ensure if they were
correct or not.

Upon review, this commit was found to be incorrect for the reasons
below, so it must be reverted.  It will be fixed up "correctly" in a
later kernel change.

This change did not properly unwind from the error condition, so it was
not correct.

Cc: Kangjie Lu <kjlu@umn.edu>
Acked-by: Jiri Slaby <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20210503115736.2104747-11-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/max310x.c

index 8534d6e45a1d7b65c149a130526aa5314203b66b..a3ba0e6520a14fa41eb15859d693a678b9a04a7a 100644 (file)
@@ -1518,10 +1518,10 @@ static int __init max310x_uart_init(void)
                return ret;
 
 #ifdef CONFIG_SPI_MASTER
-       ret = spi_register_driver(&max310x_spi_driver);
+       spi_register_driver(&max310x_spi_driver);
 #endif
 
-       return ret;
+       return 0;
 }
 module_init(max310x_uart_init);