Commit 8d6dda7f0ce53c55ec14eb5eaa360d549641586b

Authored by roel kluin
Committed by James Bottomley
1 parent 237abac6ff

[SCSI] u14-34f: fix scsi_dma_map failure case

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

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>

Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff

drivers/scsi/u14-34f.c
... ... @@ -1111,7 +1111,8 @@
1111 1111  
1112 1112 static void map_dma(unsigned int i, unsigned int j) {
1113 1113 unsigned int data_len = 0;
1114   - unsigned int k, count, pci_dir;
  1114 + unsigned int k, pci_dir;
  1115 + int count;
1115 1116 struct scatterlist *sg;
1116 1117 struct mscp *cpp;
1117 1118 struct scsi_cmnd *SCpnt;