iommu/amd: Fix double free of mem-region in error-path
authorJoerg Roedel <joerg.roedel@amd.com>
Fri, 9 Mar 2012 12:37:48 +0000 (13:37 +0100)
committerJoerg Roedel <joerg.roedel@amd.com>
Fri, 9 Mar 2012 12:37:48 +0000 (13:37 +0100)
commit6e930045abe51013ee3b47eaeb5aef4bc5a35218
tree205cc19a0b9b41f2bb61e09ac0e6659079ce117d
parent8704a1ba4751fc5ffe2289765cb7222b3a1e20d5
iommu/amd: Fix double free of mem-region in error-path

When ioremap_nocache fails in iommu initialization the code
calls release_mem_region immediatly. But the function is
called again when the propagates into the upper init
functions leading to a double-free. Fix that.

Reported-by: Don Dutile <ddutile@redhat.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
drivers/iommu/amd_iommu_init.c