Commit 896fc242 authored by Yunsheng Lin's avatar Yunsheng Lin Committed by Michael S. Tsirkin
Browse files

vhost: Remove unnecessary variable

It is unnecessary to use ret variable to return the error
code, just return the error code directly.

Signed-off-by: default avatarYunsheng Lin <>
Signed-off-by: default avatarMichael S. Tsirkin <>
parent 718be6ba
......@@ -203,7 +203,6 @@ EXPORT_SYMBOL_GPL(vhost_poll_init);
int vhost_poll_start(struct vhost_poll *poll, struct file *file)
__poll_t mask;
int ret = 0;
if (poll->wqh)
return 0;
......@@ -213,10 +212,10 @@ int vhost_poll_start(struct vhost_poll *poll, struct file *file)
vhost_poll_wakeup(&poll->wait, 0, 0, poll_to_key(mask));
if (mask & EPOLLERR) {
ret = -EINVAL;
return -EINVAL;
return ret;
return 0;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment