Message ID | 20230216102023.30-1-alsp705@gmail.com |
---|---|
State | New |
Headers | show |
Series | scsi-3w-9xxx: NULL check in twa_scsiop_execute_scsi() | expand |
diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c index 6cb9cca..5a99294 100644 --- a/drivers/scsi/3w-9xxx.c +++ b/drivers/scsi/3w-9xxx.c @@ -1841,7 +1841,7 @@ static int twa_scsiop_execute_scsi(TW_Device_Extension *tw_dev, int request_id, if (!sglistarg) { /* Map sglist from scsi layer to cmd packet */ - if (scsi_sg_count(srb)) { + if (srb && scsi_sg_count(srb)) { if (!twa_command_mapped(srb)) { if (srb->sc_data_direction == DMA_TO_DEVICE || srb->sc_data_direction == DMA_BIDIRECTIONAL)