scsi: dc395x: Fix warning using plain integer as NULL
authorAbhinav Singh <singhabhinav9051571833@gmail.com>
Thu, 9 Nov 2023 21:50:49 +0000 (03:20 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 25 Nov 2023 02:08:23 +0000 (21:08 -0500)
Sparse static analysis tool generates a warning with this message "Using
plain integer as NULL pointer". Fix it.

Signed-off-by: Abhinav Singh <singhabhinav9051571833@gmail.com>
Link: https://lore.kernel.org/r/20231109215049.1466431-1-singhabhinav9051571833@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/dc395x.c

index c8e86f8a631ebd0b583783cf8ebd6d4cd04933b3..d108a86e196efe9ff00afad55227f87aa78bb2cf 100644 (file)
@@ -1366,7 +1366,7 @@ static u8 start_scsi(struct AdapterCtlBlk* acb, struct DeviceCtlBlk* dcb,
                        "command while another command (0x%p) is active.",
                        srb->cmd,
                        acb->active_dcb->active_srb ?
-                           acb->active_dcb->active_srb->cmd : 0);
+                           acb->active_dcb->active_srb->cmd : NULL);
                return 1;
        }
        if (DC395x_read16(acb, TRM_S1040_SCSI_STATUS) & SCSIINTERRUPT) {