Commit 2381a1b4 authored by Jinhui Guo's avatar Jinhui Guo Committed by Joerg Roedel
Browse files

iommu/amd: Propagate the error code returned by __modify_irte_ga() in modify_irte_ga()



The return type of __modify_irte_ga() is int, but modify_irte_ga()
treats it as a bool. Casting the int to bool discards the error code.

To fix the issue, change the type of ret to int in modify_irte_ga().

Fixes: 57cdb720 ("iommu/amd: Do not flush IRTE when only updating isRun and destination fields")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarJinhui Guo <guojinhui.liam@bytedance.com>
Reviewed-by: default avatarVasant Hegde <vasant.hegde@amd.com>
Signed-off-by: default avatarJoerg Roedel <joerg.roedel@amd.com>
parent 75ba146c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3380,7 +3380,7 @@ static int __modify_irte_ga(struct amd_iommu *iommu, u16 devid, int index,
static int modify_irte_ga(struct amd_iommu *iommu, u16 devid, int index,
			  struct irte_ga *irte)
{
	bool ret;
	int ret;

	ret = __modify_irte_ga(iommu, devid, index, irte);
	if (ret)