Skip to content

Commit 2381a1b

Browse files
guojinhui-liamjoergroedel
authored andcommitted
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: 57cdb72 ("iommu/amd: Do not flush IRTE when only updating isRun and destination fields") Cc: stable@vger.kernel.org Signed-off-by: Jinhui Guo <guojinhui.liam@bytedance.com> Reviewed-by: Vasant Hegde <vasant.hegde@amd.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
1 parent 75ba146 commit 2381a1b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/iommu/amd/iommu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3380,7 +3380,7 @@ static int __modify_irte_ga(struct amd_iommu *iommu, u16 devid, int index,
33803380
static int modify_irte_ga(struct amd_iommu *iommu, u16 devid, int index,
33813381
struct irte_ga *irte)
33823382
{
3383-
bool ret;
3383+
int ret;
33843384

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

0 commit comments

Comments
 (0)