diff options
author | Mostafa Saleh <smostafa@google.com> | 2024-06-04 21:52:18 +0300 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2024-06-05 15:48:00 +0300 |
commit | d3867e7148318e12b5d69b64950622f5ed06fe86 (patch) | |
tree | 37e32999d31526da73119f77ee63143855d86304 /LICENSES | |
parent | c3f38fa61af77b49866b006939479069cd451173 (diff) | |
download | linux-d3867e7148318e12b5d69b64950622f5ed06fe86.tar.xz |
iommu/arm-smmu-v3: Avoid uninitialized asid in case of error
Static checker is complaining about the ASID possibly set uninitialized.
This only happens in case of error and this value would be ignored anyway.
A simple fix would be just to initialize the local variable to zero,
this path will only be reached on the first attach to a domain where
the CD is already initialized to zero.
This avoids having to bloat the function with an error path.
Closes: https://lore.kernel.org/linux-iommu/849e3d77-0a3c-43c4-878d-a0e061c8cd61@moroto.mountain/T/#u
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Mostafa Saleh <smostafa@google.com>
Fixes: 04905c17f648 ("iommu/arm-smmu-v3: Build the whole CD in arm_smmu_make_s1_cd()")
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20240604185218.2602058-1-smostafa@google.com
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'LICENSES')
0 files changed, 0 insertions, 0 deletions