From: Keir Fraser Date: Thu, 31 Jul 2008 14:38:09 +0000 (+0100) Subject: AMD IOMMU: spin_uinlock() on early return path. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14165^2~55 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=00a02b0a94cccf86406564034a8d22cf57e179ed;p=xen.git AMD IOMMU: spin_uinlock() on early return path. Signed-off-by: Wei Wang --- diff --git a/xen/drivers/passthrough/amd/iommu_init.c b/xen/drivers/passthrough/amd/iommu_init.c index 3bd91adf70..0a2081fe39 100644 --- a/xen/drivers/passthrough/amd/iommu_init.c +++ b/xen/drivers/passthrough/amd/iommu_init.c @@ -477,7 +477,10 @@ void __init enable_iommu(struct amd_iommu *iommu) spin_lock_irqsave(&iommu->lock, flags); if ( iommu->enabled ) + { + spin_unlock_irqrestore(&iommu->lock, flags); return; + } iommu->dev_table.alloc_size = device_table.alloc_size; iommu->dev_table.entries = device_table.entries;