diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2021-09-07 10:32:24 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2021-09-14 18:10:42 -0400 |
commit | 6243e3c78ace66d337a1e43b60a1aa8f5b61bd72 (patch) | |
tree | e7557f7b9d362eb8e51f8bad33ad9910cb8b1e01 /drivers/vdpa | |
parent | 0d818706130e2f4e828c3fc028917677fac76a09 (diff) | |
download | linux-next-6243e3c78ace66d337a1e43b60a1aa8f5b61bd72.tar.gz |
vduse: missing error code in vduse_init()
This should return -ENOMEM if alloc_workqueue() fails. Currently it
returns success.
Fixes: b66219796563 ("vduse: Introduce VDUSE - vDPA Device in Userspace")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20210907073223.GA18254@kili
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Xie Yongji <xieyongji@bytedance.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'drivers/vdpa')
-rw-r--r-- | drivers/vdpa/vdpa_user/vduse_dev.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/vdpa/vdpa_user/vduse_dev.c b/drivers/vdpa/vdpa_user/vduse_dev.c index 29a38ecba19e..e36287feac0e 100644 --- a/drivers/vdpa/vdpa_user/vduse_dev.c +++ b/drivers/vdpa/vdpa_user/vduse_dev.c @@ -1593,8 +1593,10 @@ static int vduse_init(void) vduse_irq_wq = alloc_workqueue("vduse-irq", WQ_HIGHPRI | WQ_SYSFS | WQ_UNBOUND, 0); - if (!vduse_irq_wq) + if (!vduse_irq_wq) { + ret = -ENOMEM; goto err_wq; + } ret = vduse_domain_init(); if (ret) |