Skip to content

Commit 0b242eb

Browse files
committed
iommu/arm-smmu: Fix uninitilized variable warning
Some unrelated changes in the iommu code caused a new warning to appear in the arm-smmu driver: CC drivers/iommu/arm-smmu.o drivers/iommu/arm-smmu.c: In function 'arm_smmu_add_device': drivers/iommu/arm-smmu.c:1441:2: warning: 'smmu' may be used uninitialized in this function [-Wmaybe-uninitialized] arm_smmu_rpm_put(smmu); ^~~~~~~~~~~~~~~~~~~~~~ The warning is a false positive, but initialize the variable to NULL to get rid of it. Signed-off-by: Joerg Roedel <[email protected]> Tested-by: Will Deacon <[email protected]> # arm-smmu Reviewed-by: Jean-Philippe Brucker <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 72acd9d commit 0b242eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iommu/arm-smmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1383,7 +1383,7 @@ struct arm_smmu_device *arm_smmu_get_by_fwnode(struct fwnode_handle *fwnode)
13831383

13841384
static int arm_smmu_add_device(struct device *dev)
13851385
{
1386-
struct arm_smmu_device *smmu;
1386+
struct arm_smmu_device *smmu = NULL;
13871387
struct arm_smmu_master_cfg *cfg;
13881388
struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev);
13891389
int i, ret;

0 commit comments

Comments
 (0)