From f2d79aa16aee19e8f4aea3c3a6f6724124060e65 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Mon, 23 Oct 2023 09:30:21 +0200 Subject: [PATCH] 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 Signed-off-by: Hannes Reinecke Link: https://lore.kernel.org/r/20231023073021.21954-1-hare@suse.de Signed-off-by: Martin K. Petersen --- drivers/scsi/megaraid.c | 11 +++++++---- 1 file 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 \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 \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;