From: Jinhui Guo Date: Thu, 20 Nov 2025 15:47:25 +0000 (+0800) Subject: iommu/amd: Propagate the error code returned by __modify_irte_ga() in modify_irte_ga() X-Git-Tag: v6.19-rc1~133^2^7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2381a1b40be4b286062fb3cf67dd7f005692aa2a;p=thirdparty%2Flinux.git 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: 57cdb720eaa5 ("iommu/amd: Do not flush IRTE when only updating isRun and destination fields") Cc: stable@vger.kernel.org Signed-off-by: Jinhui Guo Reviewed-by: Vasant Hegde Signed-off-by: Joerg Roedel --- diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c index a520a109f8d6d..a5fb6af4fd2d6 100644 --- a/drivers/iommu/amd/iommu.c +++ b/drivers/iommu/amd/iommu.c @@ -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)