浏览代码

iommu/omap: Return ERR_PTR in device_group call-back

Make sure that the device_group callback returns an ERR_PTR
instead of NULL.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
Joerg Roedel 8 年之前
父节点
当前提交
8faf5e5a12
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/iommu/omap-iommu.c

+ 1 - 1
drivers/iommu/omap-iommu.c

@@ -1309,7 +1309,7 @@ static void omap_iommu_remove_device(struct device *dev)
 static struct iommu_group *omap_iommu_device_group(struct device *dev)
 {
 	struct omap_iommu_arch_data *arch_data = dev->archdata.iommu;
-	struct iommu_group *group = NULL;
+	struct iommu_group *group = ERR_PTR(-EINVAL);
 
 	if (arch_data->iommu_dev)
 		group = arch_data->iommu_dev->group;