All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] iommu/amd: Fix error return code in irq_remapping_alloc()
@ 2016-07-28  2:10 ` Wei Yongjun
  0 siblings, 0 replies; 4+ messages in thread
From: Wei Yongjun @ 2016-07-28  2:10 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: Wei Yongjun, iommu, linux-kernel

Fix to return a negative error code from the alloc_irq_index() error
handling case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
---
 drivers/iommu/amd_iommu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 96de97a..71e94f3 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -3886,6 +3886,7 @@ static int irq_remapping_alloc(struct irq_domain *domain, unsigned int virq,
 	}
 	if (index < 0) {
 		pr_warn("Failed to allocate IRTE\n");
+		ret = index;
 		goto out_free_parent;
 	}

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

* [PATCH -next] iommu/amd: Fix error return code in irq_remapping_alloc()
@ 2016-07-28  2:10 ` Wei Yongjun
  0 siblings, 0 replies; 4+ messages in thread
From: Wei Yongjun @ 2016-07-28  2:10 UTC (permalink / raw)
  To: Joerg Roedel
  Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, Wei Yongjun,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Fix to return a negative error code from the alloc_irq_index() error
handling case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 drivers/iommu/amd_iommu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 96de97a..71e94f3 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -3886,6 +3886,7 @@ static int irq_remapping_alloc(struct irq_domain *domain, unsigned int virq,
 	}
 	if (index < 0) {
 		pr_warn("Failed to allocate IRTE\n");
+		ret = index;
 		goto out_free_parent;
 	}

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

* Re: [PATCH -next] iommu/amd: Fix error return code in irq_remapping_alloc()
@ 2016-08-09 15:19   ` Joerg Roedel
  0 siblings, 0 replies; 4+ messages in thread
From: Joerg Roedel @ 2016-08-09 15:19 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: iommu, linux-kernel

On Thu, Jul 28, 2016 at 02:10:26AM +0000, Wei Yongjun wrote:
> Fix to return a negative error code from the alloc_irq_index() error
> handling case instead of 0, as done elsewhere in this function.
> 
> Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>

Applied, thanks.

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

* Re: [PATCH -next] iommu/amd: Fix error return code in irq_remapping_alloc()
@ 2016-08-09 15:19   ` Joerg Roedel
  0 siblings, 0 replies; 4+ messages in thread
From: Joerg Roedel @ 2016-08-09 15:19 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On Thu, Jul 28, 2016 at 02:10:26AM +0000, Wei Yongjun wrote:
> Fix to return a negative error code from the alloc_irq_index() error
> handling case instead of 0, as done elsewhere in this function.
> 
> Signed-off-by: Wei Yongjun <weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Applied, thanks.

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

end of thread, other threads:[~2016-08-09 15:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-28  2:10 [PATCH -next] iommu/amd: Fix error return code in irq_remapping_alloc() Wei Yongjun
2016-07-28  2:10 ` Wei Yongjun
2016-08-09 15:19 ` Joerg Roedel
2016-08-09 15:19   ` Joerg Roedel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.