Call the correct function to free the io_pgtable_ops when
there is an error.
Change-Id: Ib01041f874a203b18265b46b56b375c76c0ab211
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
int ret;
struct arm_smmu_domain *smmu_domain = domain->priv;
enum io_pgtable_fmt fmt;
- struct io_pgtable_ops *pgtbl_ops;
+ struct io_pgtable_ops *pgtbl_ops = NULL;
struct arm_smmu_cfg *cfg = &smmu_domain->cfg;
if (!(smmu->options & ARM_SMMU_OPT_DYNAMIC)) {
ret = 0;
out:
if (ret)
- kfree(pgtbl_ops);
+ free_io_pgtable_ops(pgtbl_ops);
mutex_unlock(&smmu->attach_lock);
return ret;