aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/samsung.c
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2012-09-12 02:30:01 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-17 07:45:30 -0400
commite740d8f1a0a23a8fea8fbc5a02013c7410283665 (patch)
tree384c981882e45970d2f4f35cd7424023a5647cd6 /drivers/tty/serial/samsung.c
parent47fdd641ccab534a12052dbbf093865daf114bf4 (diff)
tty: serial: Samsung: Fix return value
Return the value returned by the failing function instead of -1 (which does not convey the right error information). Fixes the following smatch warning: drivers/tty/serial/samsung.c:1687 s3c24xx_serial_modinit() info: why not propagate 'ret' from uart_register_driver() instead of -1? Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/samsung.c')
-rw-r--r--drivers/tty/serial/samsung.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
index bdaa06f3ab69..8eef1141b81d 100644
--- a/drivers/tty/serial/samsung.c
+++ b/drivers/tty/serial/samsung.c
@@ -1684,7 +1684,7 @@ static int __init s3c24xx_serial_modinit(void)
1684 ret = uart_register_driver(&s3c24xx_uart_drv); 1684 ret = uart_register_driver(&s3c24xx_uart_drv);
1685 if (ret < 0) { 1685 if (ret < 0) {
1686 pr_err("Failed to register Samsung UART driver\n"); 1686 pr_err("Failed to register Samsung UART driver\n");
1687 return -1; 1687 return ret;
1688 } 1688 }
1689 1689
1690 return platform_driver_register(&samsung_serial_driver); 1690 return platform_driver_register(&samsung_serial_driver);