Skip to contentSkip to conversation

U14-34F: fix scsi_dma_map failure case

PATCH New roel kluin 1 participant 1 message Oct 20, 2008 SCSI

lore
Share & tools
lore

roel kluin

author
#0 lore raw

PATCH 1/1 U14-34F: fix scsi_dma_map failure case

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

---

drivers/scsi/u14-34f.c +2 -1
index 329eb87..601e951 100644
@@ -1111,7 +1111,8 @@ static int u14_34f_detect(struct scsi_host_template *tpnt) {
 
 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;