]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/arm-smmu: Fix the error path in arm_smmu_add_device
authorVivek Gautam <vivek.gautam@codeaurora.org>
Thu, 6 Jul 2017 09:37:00 +0000 (15:07 +0530)
committerWill Deacon <will.deacon@arm.com>
Thu, 20 Jul 2017 09:30:28 +0000 (10:30 +0100)
commit6cdb07bb0da1f1540003b43ec99ad92b80d3d5b8
tree0318cee60c8394a7bb616d58f8a21034fd580eda
parentf1a3c0995950bfc3816c10d6dcd1798925942a9d
iommu/arm-smmu: Fix the error path in arm_smmu_add_device

fwspec->iommu_priv is available only after arm_smmu_master_cfg
instance has been allocated. We shouldn't free it before that.
Also it's logical to free the master cfg itself without
checking for fwspec.

Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
[will: remove redundant assignment to fwspec]
Signed-off-by: Will Deacon <will.deacon@arm.com>
drivers/iommu/arm-smmu.c