diff options
author | Vitaly Kuznetsov <vkuznets@redhat.com> | 2015-12-15 16:27:26 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-12-21 13:14:56 -0800 |
commit | 77b744a598d604de49df79cf161bbd1809a6948a (patch) | |
tree | 56c7bbb9b1c4bfe47218d7267f3b048ee3d374e9 /drivers/hv/hv_utils_transport.c | |
parent | 2048157ad02e65f6327118dd4a7b9c9f1fd12f77 (diff) | |
download | blackbird-obmc-linux-77b744a598d604de49df79cf161bbd1809a6948a.tar.gz blackbird-obmc-linux-77b744a598d604de49df79cf161bbd1809a6948a.zip |
Drivers: hv: utils: fix hvt_op_poll() return value on transport destroy
The return type of hvt_op_poll() is unsigned int and -EBADF is
inappropriate, poll functions return POLL* statuses.
Reported-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hv/hv_utils_transport.c')
-rw-r--r-- | drivers/hv/hv_utils_transport.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hv/hv_utils_transport.c b/drivers/hv/hv_utils_transport.c index ee20b5074238..4f42c0e20c20 100644 --- a/drivers/hv/hv_utils_transport.c +++ b/drivers/hv/hv_utils_transport.c @@ -109,7 +109,7 @@ static unsigned int hvt_op_poll(struct file *file, poll_table *wait) poll_wait(file, &hvt->outmsg_q, wait); if (hvt->mode == HVUTIL_TRANSPORT_DESTROY) - return -EBADF; + return POLLERR | POLLHUP; if (hvt->outmsg_len > 0) return POLLIN | POLLRDNORM; |