Linux virtualization list
 help / color / mirror / Atom feed
* [PATCH]  viommu: return error code for unknown probe type
@ 2024-04-15  8:18 flyingpenghao
  2024-04-15 11:46 ` Jean-Philippe Brucker
  0 siblings, 1 reply; 2+ messages in thread
From: flyingpenghao @ 2024-04-15  8:18 UTC (permalink / raw)
  To: jean-philippe; +Cc: virtualization, Peng Hao

From: Peng Hao <flyingpeng@tencent.com>

If the probe types processed by the loop are all unknown,
no error will be returned.

Signed-off-by: Peng Hao <flyingpeng@tencent.com>
---
 drivers/iommu/virtio-iommu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iommu/virtio-iommu.c b/drivers/iommu/virtio-iommu.c
index 04048f64a2c0..80352505b762 100644
--- a/drivers/iommu/virtio-iommu.c
+++ b/drivers/iommu/virtio-iommu.c
@@ -555,6 +555,7 @@ static int viommu_probe_endpoint(struct viommu_dev *viommu, struct device *dev)
 			break;
 		default:
 			dev_err(dev, "unknown viommu prop 0x%x\n", type);
+			ret = -EINVAL;
 		}
 
 		if (ret)
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-15 11:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-15  8:18 [PATCH] viommu: return error code for unknown probe type flyingpenghao
2024-04-15 11:46 ` Jean-Philippe Brucker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox