amd/iommu: fix missing unlock in iommu_read_log

Coverity-ID: 1458632
Fixes: 709d3ddea2 ('AMD/IOMMU: Common the #732/#733 errata handling in iommu_read_log()')
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
Roger Pau Monné authored and Andrew Cooper committed 2020-02-19 11:59:39 +00:00
1 parent c47984aabe
commit a42a466c00
1 file changed
+2 -1
+2 -1
View File
@@ -338,7 +338,7 @@ static int iommu_read_log(struct amd_iommu *iommu,
{
AMD_IOMMU_DEBUG("AMD-Vi: No entry written to %s Log\n",
log == &iommu->event_log ? "Event" : "PPR");
return 0;
goto out;
}
udelay(1);
code = MASK_EXTR(ACCESS_ONCE(entry[1]), IOMMU_EVENT_CODE_MASK);
@@ -357,6 +357,7 @@ static int iommu_read_log(struct amd_iommu *iommu,
writel(log->head, iommu->mmio_base + head_offset);
}
out:
spin_unlock(&log->lock);
return 0;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.