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 <bvanassche@acm.org>
Link: https://patch.msgid.link/4e3a71e82eb2deac956ac51f9019c410037526b4.1790360262.git.bvanassche@acm.org
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
This commit is contained in:
Bart Van Assche 2026-09-25 11:26:06 -07:00 committed by Martin K. Petersen (Oracle)
parent 11c345d6db
commit 107115c393

View File

@ -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;
}