diff mbox series

[3/4] scsi: ufs: core: Make use of guard(spinlock_irq)

Message ID 20240416102348.614-4-avri.altman@wdc.com
State New
Headers show
Series simplify ufshcd with the guard() macro | expand

Commit Message

Avri Altman April 16, 2024, 10:23 a.m. UTC
Replace open-coded handling with cleanup.h guard(spinlock_irq).

Signed-off-by: Avri Altman <avri.altman@wdc.com>
---
 drivers/ufs/core/ufshcd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index 92ac6a358365..3c62b69bbd52 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -6309,10 +6309,9 @@  void ufshcd_schedule_eh_work(struct ufs_hba *hba)
 
 static void ufshcd_force_error_recovery(struct ufs_hba *hba)
 {
-	spin_lock_irq(hba->host->host_lock);
+	guard(spinlock_irq)(hba->host->host_lock);
 	hba->force_reset = true;
 	ufshcd_schedule_eh_work(hba);
-	spin_unlock_irq(hba->host->host_lock);
 }
 
 static void ufshcd_clk_scaling_allow(struct ufs_hba *hba, bool allow)