hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/scsi/53c700.c
....@@ -1600,7 +1600,7 @@
16001600 printk("scsi%d (%d:%d) PHASE MISMATCH IN SEND MESSAGE %d remain, return %p[%04x], phase %s\n", host->host_no, pun, lun, count, (void *)temp, temp - hostdata->pScript, sbcl_to_string(NCR_700_readb(host, SBCL_REG)));
16011601 #endif
16021602 resume_offset = hostdata->pScript + Ent_SendMessagePhaseMismatch;
1603
- } else if(dsp >= to32bit(&slot->pSG[0].ins) &&
1603
+ } else if (slot && dsp >= to32bit(&slot->pSG[0].ins) &&
16041604 dsp <= to32bit(&slot->pSG[NCR_700_SG_SEGMENTS].ins)) {
16051605 int data_transfer = NCR_700_readl(host, DBC_REG) & 0xffffff;
16061606 int SGcount = (dsp - to32bit(&slot->pSG[0].ins))/sizeof(struct NCR_700_SG_List);