2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-16 09:13:55 +08:00

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>
This commit is contained in:
Dan Carpenter 2021-09-07 10:32:24 +03:00 committed by Michael S. Tsirkin
parent 0d81870613
commit 6243e3c78a

View File

@ -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)