Mostafa Saleh b956989690 iommu/arm-smmu-v3: Avoid uninitialized asid in case of error
[ Upstream commit d3867e7148318e12b5d69b64950622f5ed06fe86 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-08-03 09:00:08 +02:00
..
2024-05-22 10:45:12 -07:00
2024-04-23 13:16:03 +02:00
2024-05-16 08:50:32 -07:00
2024-06-08 10:48:11 -07:00
2024-05-23 00:29:19 +02:00
2024-06-24 14:36:11 -04:00
2024-05-17 09:05:46 -07:00
2024-05-14 18:25:53 -07:00
2024-07-04 12:21:39 +02:00
2024-05-23 12:04:36 -07:00
2024-05-23 12:04:36 -07:00
2024-05-07 23:40:46 +02:00
2024-07-10 14:47:35 -07:00
2024-05-08 19:21:51 +01:00
2024-04-23 13:16:03 +02:00
2024-05-23 12:04:36 -07:00
2024-05-22 10:45:12 -07:00
2024-05-23 12:04:36 -07:00
2024-05-24 10:24:49 -07:00
2024-04-29 16:45:53 +02:00