diff options
author | Hannes Reinecke <hare@suse.de> | 2023-10-23 09:30:21 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2023-10-25 04:40:39 +0200 |
commit | f2d79aa16aee19e8f4aea3c3a6f6724124060e65 (patch) | |
tree | 3fe50e5b218782f5aff0900e828913d1f7d406d6 | |
parent | scsi: aic79xx: Fix up NULL command in ahd_done() (diff) | |
download | linux-f2d79aa16aee19e8f4aea3c3a6f6724124060e65.tar.xz linux-f2d79aa16aee19e8f4aea3c3a6f6724124060e65.zip |
scsi: megaraid: Fix up debug message in megaraid_abort_and_reset()
Found by Smatch.
Fixes: 5bcd3bfbda02 ("scsi: megaraid: Pass in NULL scb for host reset")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Link: https://lore.kernel.org/r/20231023073021.21954-1-hare@suse.de
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r-- | drivers/scsi/megaraid.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c index 329c3da88416..66a30a3e6cd5 100644 --- a/drivers/scsi/megaraid.c +++ b/drivers/scsi/megaraid.c @@ -1925,10 +1925,13 @@ megaraid_abort_and_reset(adapter_t *adapter, struct scsi_cmnd *cmd, int aor) struct list_head *pos, *next; scb_t *scb; - dev_warn(&adapter->dev->dev, "%s cmd=%x <c=%d t=%d l=%d>\n", - (aor == SCB_ABORT)? "ABORTING":"RESET", - cmd->cmnd[0], cmd->device->channel, - cmd->device->id, (u32)cmd->device->lun); + if (aor == SCB_ABORT) + dev_warn(&adapter->dev->dev, + "ABORTING cmd=%x <c=%d t=%d l=%d>\n", + cmd->cmnd[0], cmd->device->channel, + cmd->device->id, (u32)cmd->device->lun); + else + dev_warn(&adapter->dev->dev, "RESETTING\n"); if(list_empty(&adapter->pending_list)) return FAILED; |