[PATCH] tty: pass return value of spi_register_driver

From: Kangjie Lu
Date: Tue Dec 25 2018 - 20:26:53 EST


spi_register_driver() may fail, so let's pass its return value upstream.

Signed-off-by: Kangjie Lu <kjlu@xxxxxxx>
---
drivers/tty/serial/max310x.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/max310x.c b/drivers/tty/serial/max310x.c
index 3db48fcd6068..55e73646fcd2 100644
--- a/drivers/tty/serial/max310x.c
+++ b/drivers/tty/serial/max310x.c
@@ -1470,10 +1470,10 @@ static int __init max310x_uart_init(void)
return ret;

#ifdef CONFIG_SPI_MASTER
- spi_register_driver(&max310x_spi_driver);
+ ret = spi_register_driver(&max310x_spi_driver);
#endif

- return 0;
+ return ret;
}
module_init(max310x_uart_init);

--
2.17.2 (Apple Git-113)