Skip to content

Commit

Permalink
vduse: missing error code in vduse_init()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Michael S. Tsirkin committed Sep 14, 2021
1 parent 0d81870 commit 6243e3c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/vdpa/vdpa_user/vduse_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6243e3c

Please sign in to comment.