iommu/tegra-gart: fix spin_unlock in map failure path
Lucas Stach [Mon, 12 Mar 2012 19:15:01 +0000 (20:15 +0100)]
This must have been messed up while merging, the intention was
clearly to unlock there.

Change-Id: Icf525a51d4899dc718710ec56a4d3fd2150501cd
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Hiroshi DOYU <hdoyu@nvidia.com>
Reviewed-on: http://git-master/r/96139
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>

drivers/iommu/tegra-gart.c

index c33557c..618f1bf 100644 (file)
@@ -246,7 +246,7 @@ static int gart_iommu_map(struct iommu_domain *domain, unsigned long iova,
        pfn = __phys_to_pfn(pa);
        if (!pfn_valid(pfn)) {
                dev_err(gart->dev, "Invalid page: %08x\n", pa);
-               spin_lock_irqsave(&gart->pte_lock, flags);
+               spin_unlock_irqrestore(&gart->pte_lock, flags);
                return -EINVAL;
        }
        gart_set_pte(gart, iova, GART_PTE(pfn));