diff options
author | Yunsheng Lin <linyunsheng@huawei.com> | 2019-08-20 20:36:32 +0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2019-09-04 06:21:17 -0400 |
commit | 896fc242bc1d261c1178838487a0a54b260625cc (patch) | |
tree | db71558aa7298dce8e8357146fcf5bb0b43091f3 | |
parent | 718be6bab26fb01fa0147a2b614a3eefd96a2957 (diff) |
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: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-rw-r--r-- | drivers/vhost/vhost.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 0536f8526359..1ac9de250319 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -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) { vhost_poll_stop(poll); - ret = -EINVAL; + return -EINVAL; } - return ret; + return 0; } EXPORT_SYMBOL_GPL(vhost_poll_start); |