* [PATCH] serial: Samsung: Fix return value
@ 2012-09-12 6:30 Sachin Kamat
2012-09-17 10:39 ` Sachin Kamat
0 siblings, 1 reply; 2+ messages in thread
From: Sachin Kamat @ 2012-09-12 6:30 UTC (permalink / raw)
To: linux-serial; +Cc: alan, gregkh, sachin.kamat, patches
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>
---
drivers/tty/serial/samsung.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
index bdaa06f..8eef114 100644
--- a/drivers/tty/serial/samsung.c
+++ b/drivers/tty/serial/samsung.c
@@ -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);
--
1.7.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] serial: Samsung: Fix return value
2012-09-12 6:30 [PATCH] serial: Samsung: Fix return value Sachin Kamat
@ 2012-09-17 10:39 ` Sachin Kamat
0 siblings, 0 replies; 2+ messages in thread
From: Sachin Kamat @ 2012-09-17 10:39 UTC (permalink / raw)
To: linux-serial; +Cc: alan, gregkh, sachin.kamat, patches, alan
ping..
On 12 September 2012 12:00, Sachin Kamat <sachin.kamat@linaro.org> wrote:
> 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>
> ---
> drivers/tty/serial/samsung.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
> index bdaa06f..8eef114 100644
> --- a/drivers/tty/serial/samsung.c
> +++ b/drivers/tty/serial/samsung.c
> @@ -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);
> --
> 1.7.4.1
>
--
With warm regards,
Sachin
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-09-17 10:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-12 6:30 [PATCH] serial: Samsung: Fix return value Sachin Kamat
2012-09-17 10:39 ` Sachin Kamat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).