From: Sachin Kamat <sachin.kamat@linaro.org>
To: linux-serial@vger.kernel.org
Cc: alan@linux.intel.com, gregkh@linuxfoundation.org,
sachin.kamat@linaro.org, patches@linaro.org
Subject: [PATCH] serial: Samsung: Fix return value
Date: Wed, 12 Sep 2012 12:00:01 +0530 [thread overview]
Message-ID: <1347431401-3306-1-git-send-email-sachin.kamat@linaro.org> (raw)
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
next reply other threads:[~2012-09-12 6:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-12 6:30 Sachin Kamat [this message]
2012-09-17 10:39 ` [PATCH] serial: Samsung: Fix return value Sachin Kamat
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1347431401-3306-1-git-send-email-sachin.kamat@linaro.org \
--to=sachin.kamat@linaro.org \
--cc=alan@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-serial@vger.kernel.org \
--cc=patches@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).