Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1676604

[PATCH 2/3] iommu/omap: Return ERR_PTR in device_group call-back

From Joerg Roedel <joro@8bytes.org>
Newsgroups linux.kernel
Subject [PATCH 2/3] iommu/omap: Return ERR_PTR in device_group call-back
Date 2017-06-28 14:10 +0200
Message-ID <tXjXc-6DX-23@gated-at.bofh.it> (permalink)
References <tXjXc-6DX-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Joerg Roedel <jroedel@suse.de>

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

Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
 drivers/iommu/omap-iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
index 95dfca3..641e035 100644
--- a/drivers/iommu/omap-iommu.c
+++ b/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;
-- 
2.7.4

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/3] iommu: Return ERR_PTR() values from device_group call-backs Joerg Roedel <joro@8bytes.org> - 2017-06-28 14:10 +0200
  [PATCH 2/3] iommu/omap: Return ERR_PTR in device_group call-back Joerg Roedel <joro@8bytes.org> - 2017-06-28 14:10 +0200
    Re: [PATCH 2/3] iommu/omap: Return ERR_PTR in device_group call-back Suman Anna <s-anna@ti.com> - 2017-06-28 20:00 +0200
  Re: [PATCH 1/3] iommu: Return ERR_PTR() values from device_group  call-backs Gerald Schaefer <gerald.schaefer@de.ibm.com> - 2017-06-28 17:50 +0200

csiph-web