Commit 45ba5b3
iommu/amd: Fix failure return from snp_lookup_rmpentry()
Commit
f366a8d: ("iommu/amd: Clean up RMP entries for IOMMU pages during SNP shutdown")
leads to the following Smatch static checker warning:
drivers/iommu/amd/init.c:3820 iommu_page_make_shared() error: uninitialized symbol 'assigned'.
Fix it.
[ bp: Address the other error cases too. ]
Fixes: f366a8d ("iommu/amd: Clean up RMP entries for IOMMU pages during SNP shutdown")
Closes: https://lore.kernel.org/linux-iommu/1be69f6a-e7e1-45f9-9a74-b2550344f3fd@moroto.mountain
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Ashish Kalra <ashish.kalra@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Cc: Joerg Roedel <jroedel@suse.com>
Link: https://lore.kernel.org/lkml/20240126041126.1927228-20-michael.roth@amd.com1 parent 1c811d4 commit 45ba5b3
1 file changed
Lines changed: 15 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3813 | 3813 | | |
3814 | 3814 | | |
3815 | 3815 | | |
3816 | | - | |
3817 | | - | |
3818 | | - | |
| 3816 | + | |
| 3817 | + | |
| 3818 | + | |
| 3819 | + | |
3819 | 3820 | | |
3820 | | - | |
3821 | | - | |
3822 | | - | |
| 3821 | + | |
| 3822 | + | |
| 3823 | + | |
| 3824 | + | |
3823 | 3825 | | |
3824 | 3826 | | |
3825 | 3827 | | |
3826 | | - | |
3827 | | - | |
3828 | | - | |
3829 | | - | |
| 3828 | + | |
| 3829 | + | |
| 3830 | + | |
| 3831 | + | |
| 3832 | + | |
| 3833 | + | |
3830 | 3834 | | |
3831 | 3835 | | |
3832 | 3836 | | |
| 3837 | + | |
3833 | 3838 | | |
3834 | 3839 | | |
3835 | 3840 | | |
| |||
0 commit comments