Skip to content

Commit

Permalink
[SCSI] u14-34f: fix scsi_dma_map failure case
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
roel kluin authored and James Bottomley committed Dec 29, 2008
1 parent 237abac commit 8d6dda7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/scsi/u14-34f.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8d6dda7

Please sign in to comment.