From: FUJITA Tomonori Date: Tue, 9 Mar 2010 02:09:50 +0000 (+0900) Subject: [SCSI] mpt2sas: fix the incorrect scsi_dma_map error checking X-Git-Tag: v2.6.35-rc1~470^2^2~178 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb789d01620e5d36081b22edb6fb71cf55ff043c;p=pandora-kernel.git [SCSI] mpt2sas: fix the incorrect scsi_dma_map error checking scsi_dma_map() returns -1 if an error occurred (zero means that the command has no data). So the following current code can't catch an error: sges_left = scsi_dma_map(scmd); if (!sges_left) { sdev_printk(KERN_ERR, scmd->device, "pci_map_sg" " failed: request for %d bytes!\n", scsi_bufflen(scmd)); return -ENOMEM; } Signed-off-by: FUJITA Tomonori Acked-by: "Desai, Kashyap" Signed-off-by: James Bottomley --- Reading git-diff-tree failed