mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-15 08:44:14 +08:00
net: qrtr: ns: Fix error return code in qrtr_ns_init()
Fix to return a negative error code -ENOMEM from the error handling
case instead of 0, as done elsewhere in this function.
Fixes: c6e08d6251
("net: qrtr: Allocate workqueue before kernel_bind")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
20e76d3d04
commit
a49e72b3bd
@ -775,8 +775,10 @@ int qrtr_ns_init(void)
|
||||
}
|
||||
|
||||
qrtr_ns.workqueue = alloc_workqueue("qrtr_ns_handler", WQ_UNBOUND, 1);
|
||||
if (!qrtr_ns.workqueue)
|
||||
if (!qrtr_ns.workqueue) {
|
||||
ret = -ENOMEM;
|
||||
goto err_sock;
|
||||
}
|
||||
|
||||
qrtr_ns.sock->sk->sk_data_ready = qrtr_ns_data_ready;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user