PCI: endpoint: Fix a potential NULL pointer dereference

In case alloc_workqueue() fails, return -ENOMEM to avoid
potential NULL pointer dereferences.

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
[lorenzo.pieralisi@arm.com: commit log and code update]
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
This commit is contained in:
Kangjie Lu 2019-03-15 00:07:10 -05:00 • committed by Lorenzo Pieralisi
commit 507b820009