mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
NVMe: Check for NULL memory in nvme_dev_add
Signed-off-by: Keith Busch <[email protected]> Signed-off-by: Matthew Wilcox <[email protected]>
This commit is contained in:
parent
68b8eca5f8
commit
a9ef4343af
1 changed files with 2 additions and 0 deletions
|
|
@ -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…
Reference in a new issue