Skip to content

Commit

Permalink
tty: serial: Samsung: Fix return value
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sachin Kamat authored and Greg Kroah-Hartman committed Sep 17, 2012
1 parent 47fdd64 commit e740d8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/tty/serial/samsung.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e740d8f

Please sign in to comment.