From 107115c393ea2bc092ab94c5d72bf10cf641f495 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 25 Sep 2026 11:26:06 -0700 Subject: [PATCH] scsi: hpsa: Prepare for enabling lock context analysis mutex_lock_interruptible() returns a negative value upon failure or zero upon success. Since the Clang thread-safety analyzer only supports == 0 and != 0 tests for functions that perform conditional locking, change the == -EINTR test into != 0. This change does not modify the behavior of hpsa_do_reset(). Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/4e3a71e82eb2deac956ac51f9019c410037526b4.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) --- drivers/scsi/hpsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 4009edcfd2b1..187505950b63 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -3166,7 +3166,7 @@ static int hpsa_do_reset(struct ctlr_info *h, struct hpsa_scsi_dev_t *dev, int rc = 0; /* We can really only handle one reset at a time */ - if (mutex_lock_interruptible(&h->reset_mutex) == -EINTR) { + if (mutex_lock_interruptible(&h->reset_mutex)) { dev_warn(&h->pdev->dev, "concurrent reset wait interrupted.\n"); return -EINTR; }