Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1667781 > unrolled thread
| Started by | Joerg Roedel <joro@8bytes.org> |
|---|---|
| First post | 2017-06-16 16:20 +0200 |
| Last post | 2017-06-16 16:20 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 4/7] iommu/amd: Check for error states first in iommu_go_to_state() Joerg Roedel <joro@8bytes.org> - 2017-06-16 16:20 +0200
| From | Joerg Roedel <joro@8bytes.org> |
|---|---|
| Date | 2017-06-16 16:20 +0200 |
| Subject | [PATCH 4/7] iommu/amd: Check for error states first in iommu_go_to_state() |
| Message-ID | <tT0gq-1a4-11@gated-at.bofh.it> |
From: Joerg Roedel <jroedel@suse.de>
Check if we are in an error state already before calling
into state_next().
Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
drivers/iommu/amd_iommu_init.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c
index c40adc8..a31f375 100644
--- a/drivers/iommu/amd_iommu_init.c
+++ b/drivers/iommu/amd_iommu_init.c
@@ -2465,14 +2465,14 @@ static int __init state_next(void)
static int __init iommu_go_to_state(enum iommu_init_state state)
{
- int ret = 0;
+ int ret = -EINVAL;
while (init_state != state) {
- ret = state_next();
if (init_state == IOMMU_NOT_FOUND ||
init_state == IOMMU_INIT_ERROR ||
init_state == IOMMU_CMDLINE_DISABLED)
break;
+ ret = state_next();
}
return ret;
--
2.7.4
Back to top | Article view | linux.kernel
csiph-web