projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1b1e942
)
iommu/amd: Check for error states first in iommu_go_to_state()
author
Joerg Roedel
<jroedel@suse.de>
Fri, 16 Jun 2017 14:09:57 +0000
(16:09 +0200)
committer
Joerg Roedel
<jroedel@suse.de>
Thu, 22 Jun 2017 10:54:20 +0000
(12:54 +0200)
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
patch
|
blob
|
blame
|
history
diff --git
a/drivers/iommu/amd_iommu_init.c
b/drivers/iommu/amd_iommu_init.c
index df9ec85271f56b30ef7bb395dc185f349a74fc47..a6b81a05a0d1e9cfc75a6a719443debf8b21141a 100644
(file)
--- a/
drivers/iommu/amd_iommu_init.c
+++ b/
drivers/iommu/amd_iommu_init.c
@@
-2467,14
+2467,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;