提交 e740d8f1 编写于 作者: S Sachin Kamat 提交者: Greg Kroah-Hartman

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: NSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 47fdd641
......@@ -1684,7 +1684,7 @@ static int __init s3c24xx_serial_modinit(void)
ret = uart_register_driver(&s3c24xx_uart_drv);
if (ret < 0) {
pr_err("Failed to register Samsung UART driver\n");
return -1;
return ret;
}
return platform_driver_register(&samsung_serial_driver);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册