mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-28 12:53:14 +01:00
dmaengine: hisilicon: Return -ENOMEM on dynamic memory allocation in probe
Out of memory situation on driver's probe is expected to be reported to
the driver's framework with a proper -ENOMEM error code.
Fixes: e9f08b6525 ("dmaengine: hisilicon: Add Kunpeng DMA engine support")
Signed-off-by: Vladimir Zapolskiy <[email protected]>
Reviewed-by: Frank Li <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Vinod Koul <[email protected]>
This commit is contained in:
1 parent
f7e89cba18
commit
cbabdd6ce1
1 file changed
+1
-1
@@ -983,7 +983,7 @@ static int hisi_dma_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
hdma_dev = devm_kzalloc(dev, struct_size(hdma_dev, chan, chan_num),
|
||||
GFP_KERNEL);
|
||||
if (!hdma_dev)
|
||||
return -EINVAL;
|
||||
return -ENOMEM;
|
||||
|
||||
hdma_dev->base = pcim_iomap_table(pdev)[PCI_BAR_2];
|
||||
hdma_dev->pdev = pdev;
|
||||
|
||||
Reference in new issue
Block a user