mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-18 15:09:53 +00:00
powerpc: kmalloc failure ignored in vio_build_iommu_table()
Prevent NULL dereference if kmalloc() fails. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
parent
254be490f2
commit
0f3372741f
@ -1054,6 +1054,8 @@ static struct iommu_table *vio_build_iommu_table(struct vio_dev *dev)
|
||||
return NULL;
|
||||
|
||||
tbl = kmalloc(sizeof(*tbl), GFP_KERNEL);
|
||||
if (tbl == NULL)
|
||||
return NULL;
|
||||
|
||||
of_parse_dma_window(dev->dev.archdata.of_node, dma_window,
|
||||
&tbl->it_index, &offset, &size);
|
||||
|
Loading…
Reference in New Issue
Block a user