]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iommu/amd: Propagate the error code returned by __modify_irte_ga() in modify_irte_ga()
authorJinhui Guo <guojinhui.liam@bytedance.com>
Thu, 20 Nov 2025 15:47:25 +0000 (23:47 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Jan 2026 09:14:39 +0000 (10:14 +0100)
commit1970ddf9f70dc99b5d908157b4aed86d57d3c1ce
treee9368019a1f37d2064e17d7ab9bcaf46703e1bc5
parent168d50e1d82b5869dd7876ddbe3b8d953c5bded3
iommu/amd: Propagate the error code returned by __modify_irte_ga() in modify_irte_ga()

commit 2381a1b40be4b286062fb3cf67dd7f005692aa2a upstream.

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 <guojinhui.liam@bytedance.com>
Reviewed-by: Vasant Hegde <vasant.hegde@amd.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iommu/amd/iommu.c