From b9f5a18a9d7c4c41325c72971abec19278c7c6e6 Mon Sep 17 00:00:00 2001 From: Gabriel Somlo Date: Wed, 23 Nov 2022 08:04:51 -0500 Subject: [PATCH] serial: liteuart: minor style fix in liteuart_init() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Gabriel Somlo Reviewed-by: Ilpo Järvinen Reviewed-by: Geert Uytterhoeven Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20221123130500.1030189-6-gsomlo@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/liteuart.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/liteuart.c b/drivers/tty/serial/liteuart.c index c6eb7eba5af85..1e3429bcc2adf 100644 --- a/drivers/tty/serial/liteuart.c +++ b/drivers/tty/serial/liteuart.c @@ -397,12 +397,10 @@ static int __init liteuart_init(void) return res; res = platform_driver_register(&liteuart_platform_driver); - if (res) { + if (res) uart_unregister_driver(&liteuart_driver); - return res; - } - return 0; + return res; } static void __exit liteuart_exit(void) -- 2.30.2