From: santosh nayak <santoshprasadnayak@gmail.com>
To: kernel-janitors@vger.kernel.org
Subject: [PATCH] Drivers: hv: Fix return type of hv_post_message().
Date: Fri, 30 Mar 2012 11:50:33 +0000 [thread overview]
Message-ID: <1333107513-10434-1-git-send-email-santoshprasadnayak@gmail.com> (raw)
From: Santosh Nayak <santoshprasadnayak@gmail.com>
On failed memory allocation 'hv_post_message()' returns -ENOMEM.
As return type of this function is 'u16', -ENOMEM becomes 65524.
Change the return type from 'u16' to 'int'.
Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
---
drivers/hv/hv.c | 2 +-
drivers/hv/hyperv_vmbus.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
index 15956bd..86f8885 100644
--- a/drivers/hv/hv.c
+++ b/drivers/hv/hv.c
@@ -252,7 +252,7 @@ void hv_cleanup(void)
*
* This involves a hypercall.
*/
-u16 hv_post_message(union hv_connection_id connection_id,
+int hv_post_message(union hv_connection_id connection_id,
enum hv_message_type message_type,
void *payload, size_t payload_size)
{
diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h
index 699f0d8..b9426a6 100644
--- a/drivers/hv/hyperv_vmbus.h
+++ b/drivers/hv/hyperv_vmbus.h
@@ -495,7 +495,7 @@ extern int hv_init(void);
extern void hv_cleanup(void);
-extern u16 hv_post_message(union hv_connection_id connection_id,
+extern int hv_post_message(union hv_connection_id connection_id,
enum hv_message_type message_type,
void *payload, size_t payload_size);
--
1.7.4.4
next reply other threads:[~2012-03-30 11:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-30 11:50 santosh nayak [this message]
2012-03-30 11:53 ` [PATCH] Drivers: hv: Fix return type of hv_post_message() Dan Carpenter
2012-03-30 12:20 ` Dan Carpenter
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=1333107513-10434-1-git-send-email-santoshprasadnayak@gmail.com \
--to=santoshprasadnayak@gmail.com \
--cc=kernel-janitors@vger.kernel.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