Skip to contentSkip to conversation

U14-34F: fix scsi_dma_map failure case

PATCH NAK [email protected] 1 participant 1 message Oct 29, 2008 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 15/17 U14-34F: fix scsi_dma_map failure case

From: roel kluin <[email protected]>

When unsigned, scsi_dma_map may return -ENOMEM without triggering BUG_ON()

---

 drivers/scsi/u14-34f.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/u14-34f.c renamed from drivers/scsi/u14-34f.c~u14-34f-fix-scsi_dma_map-failure-case +2 -1
diff -puN drivers/scsi/u14-34f.c~u14-34f-fix-scsi_dma_map-failure-case drivers/scsi/u14-34f.c
@@ -1111,7 +1111,8 @@ static int u14_34f_detect(struct scsi_ho
 
 static void map_dma(unsigned int i, unsigned int j) {
    unsigned int data_len = 0;
-   unsigned int k, count, pci_dir;
+   unsigned int k, pci_dir;
+   int count;
    struct scatterlist *sg;
    struct mscp *cpp;
    struct scsi_cmnd *SCpnt;

_