Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a9ef4343 authored by Keith Busch's avatar Keith Busch Committed by Matthew Wilcox
Browse files

NVMe: Check for NULL memory in nvme_dev_add

parent 68b8eca5
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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) {