Message ID | 20220723064339.2957069-1-williamsukatube@163.com (mailing list archive) |
---|---|
State | New, archived |
Delegated to: | Lorenzo Pieralisi |
Headers | show |
Series | PCI: endpoint: check the return value of alloc_workqueue() | expand |
diff --git a/drivers/pci/endpoint/functions/pci-epf-ntb.c b/drivers/pci/endpoint/functions/pci-epf-ntb.c index 9a00448c7e61..41d85591cd1e 100644 --- a/drivers/pci/endpoint/functions/pci-epf-ntb.c +++ b/drivers/pci/endpoint/functions/pci-epf-ntb.c @@ -2124,6 +2124,11 @@ static int __init epf_ntb_init(void) kpcintb_workqueue = alloc_workqueue("kpcintb", WQ_MEM_RECLAIM | WQ_HIGHPRI, 0); + if (!kpcintb_workqueue) { + pr_err("Failed to alloc kpcintb workqueue\n"); + return -ENOMEM; + } + ret = pci_epf_register_driver(&epf_ntb_driver); if (ret) { destroy_workqueue(kpcintb_workqueue);