powerpc: kmalloc failure ignored in vio_build_iommu_table()
[linux-block.git] / arch / powerpc / kernel / vio.c
index bc7b41edbdfce10671e942cc0857fdf9d022ea5e..1b4f674ad7c40632776dd32acaafd558b5767f96 100644 (file)
@@ -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);