mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-16 14:38:49 +00:00
NVMe: Check for NULL memory in nvme_dev_add
Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
This commit is contained in:
parent
68b8eca5f8
commit
a9ef4343af
@ -1527,6 +1527,8 @@ static int nvme_dev_add(struct nvme_dev *dev)
|
||||
|
||||
mem = dma_alloc_coherent(&dev->pci_dev->dev, 8192, &dma_addr,
|
||||
GFP_KERNEL);
|
||||
if (!mem)
|
||||
return -ENOMEM;
|
||||
|
||||
res = nvme_identify(dev, 0, 1, dma_addr);
|
||||
if (res) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user