diff options
Diffstat (limited to 'arch/powerpc/kernel/vio.c')
-rw-r--r-- | arch/powerpc/kernel/vio.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c index bc7b41edbdfc..77f64218abf3 100644 --- a/arch/powerpc/kernel/vio.c +++ b/arch/powerpc/kernel/vio.c | |||
@@ -1054,6 +1054,8 @@ static struct iommu_table *vio_build_iommu_table(struct vio_dev *dev) | |||
1054 | return NULL; | 1054 | return NULL; |
1055 | 1055 | ||
1056 | tbl = kmalloc(sizeof(*tbl), GFP_KERNEL); | 1056 | tbl = kmalloc(sizeof(*tbl), GFP_KERNEL); |
1057 | if (tbl == NULL) | ||
1058 | return NULL; | ||
1057 | 1059 | ||
1058 | of_parse_dma_window(dev->dev.archdata.of_node, dma_window, | 1060 | of_parse_dma_window(dev->dev.archdata.of_node, dma_window, |
1059 | &tbl->it_index, &offset, &size); | 1061 | &tbl->it_index, &offset, &size); |
@@ -1233,7 +1235,7 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node) | |||
1233 | vio_cmo_set_dma_ops(viodev); | 1235 | vio_cmo_set_dma_ops(viodev); |
1234 | else | 1236 | else |
1235 | viodev->dev.archdata.dma_ops = &dma_iommu_ops; | 1237 | viodev->dev.archdata.dma_ops = &dma_iommu_ops; |
1236 | viodev->dev.archdata.dma_data = vio_build_iommu_table(viodev); | 1238 | set_iommu_table_base(&viodev->dev, vio_build_iommu_table(viodev)); |
1237 | set_dev_node(&viodev->dev, of_node_to_nid(of_node)); | 1239 | set_dev_node(&viodev->dev, of_node_to_nid(of_node)); |
1238 | 1240 | ||
1239 | /* init generic 'struct device' fields: */ | 1241 | /* init generic 'struct device' fields: */ |