diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2024-02-29 21:24:13 +0100 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2024-02-29 21:24:26 +0100 |
commit | 99e9ab88844a2a2e1c048264315eb0d72eb0bf88 (patch) | |
tree | 0d89b05b1816b8cac1be77ac9b3c297762502e67 /drivers/iommu/amd/iommu_v2.c | |
parent | 756e3199ba82d68ba07e5acf555d13aaa1da3da1 (diff) | |
parent | d761b18f6bc83bce94251467e3c0974243318456 (diff) |
Merge remote-tracking branch 'fslc/5.15-2.2.x-imx' into toradex_5.15-2.2.x-imx
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Conflicts:
drivers/gpu/drm/bridge/lontium-lt8912b.c
drivers/usb/dwc3/drd.c
Diffstat (limited to 'drivers/iommu/amd/iommu_v2.c')
-rw-r--r-- | drivers/iommu/amd/iommu_v2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iommu/amd/iommu_v2.c b/drivers/iommu/amd/iommu_v2.c index c96cf9b21719..29a3a62b7a3a 100644 --- a/drivers/iommu/amd/iommu_v2.c +++ b/drivers/iommu/amd/iommu_v2.c @@ -264,8 +264,8 @@ static void put_pasid_state(struct pasid_state *pasid_state) static void put_pasid_state_wait(struct pasid_state *pasid_state) { - refcount_dec(&pasid_state->count); - wait_event(pasid_state->wq, !refcount_read(&pasid_state->count)); + if (!refcount_dec_and_test(&pasid_state->count)) + wait_event(pasid_state->wq, !refcount_read(&pasid_state->count)); free_pasid_state(pasid_state); } |