Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 483a5163 authored by Susheel Khiani's avatar Susheel Khiani
Browse files

iommu/arm-smmu: Fix uninitialized use of variable error



There are couple of instances where we are declaring
variable without proper initialization and we
might end up returning these uninitialized
variables. Fix this by initializing them during
declaration.

Change-Id: Icd5b504c35683e94383d2cefd186f66000478e82
Signed-off-by: default avatarSusheel Khiani <skhiani@codeaurora.org>
parent 17d7bd58
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1517,7 +1517,7 @@ static void arm_smmu_secure_domain_unlock(struct arm_smmu_domain *smmu_domain)

static unsigned long arm_smmu_pgtbl_lock(struct arm_smmu_domain *smmu_domain)
{
	unsigned long flags;
	unsigned long flags = 0;

	if (arm_smmu_is_slave_side_secure(smmu_domain))
		mutex_lock(&smmu_domain->pgtbl_mutex_lock);
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -374,7 +374,7 @@ static int msm_iommu_sec_ptbl_init(void)
		unsigned int spare;
	} pinit = {0};
	int psize[2] = {0, 0};
	unsigned int spare;
	unsigned int spare = 0;
	int ret, ptbl_ret = 0;
	int version;
	/* Use a dummy device for dma_alloc_attrs allocation */