be2iscsi: add checks for dma mapping errors
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Fri, 15 Jan 2016 21:45:34 +0000 (00:45 +0300)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 24 Feb 2016 02:27:02 +0000 (21:27 -0500)
commite0493627c32f7d04683c44d195c0f3e1fc4678d4
tree60284df089062d8641496e59f162e658e125d14d
parent1db1194f1f6ebb6fef0f5d82d5025e049ccb77a1
be2iscsi: add checks for dma mapping errors

hwi_write_buffer() does not check if mapping dma memory succeed. The
patch adds the check and failure handling.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Reviewed-by: Jitendra Bhivare <jitendra.bhivare@avagotech.com>
Acked-by: Jitendra Bhivare <jitendra.bhivare@avagotech.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/be2iscsi/be_main.c