From: roel kluin Date: Wed, 29 Oct 2008 21:24:47 +0000 (-0700) Subject: [SCSI] u14-34f: fix scsi_dma_map failure case X-Git-Tag: v2.6.29-rc1~555^2~92 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=8d6dda7f0ce53c55ec14eb5eaa360d549641586b;p=linux-2.6-omap-h63xx.git [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 Signed-off-by: Andrew Morton Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/u14-34f.c b/drivers/scsi/u14-34f.c index 329eb8780e7..601e95141cb 100644 --- a/drivers/scsi/u14-34f.c +++ b/drivers/scsi/u14-34f.c @@ -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;