vme: tsi148: fix first DMA item mapping
authorDmitry Kalinkin <dmitry.kalinkin@gmail.com>
Thu, 28 May 2015 12:07:00 +0000 (15:07 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 13 Jun 2015 00:26:57 +0000 (17:26 -0700)
commitb2383c90a9d691201b9aee557776694cde86a935
tree104fd035675582583bd257cd016e92ab9c7006b8
parentf656eaee6368198f596ae5b8754494ec2b179a16
vme: tsi148: fix first DMA item mapping

This moves DMA mapping of the first list element to vme_list_add, the
same place where other elements mappings occur. This prevents extra
mapping or over-unmapping in the cases when vme_list_exec is called more
or less than one time respectively.

Also adds dma_mapping_error check.

Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Cc: Igor Alekseev <igor.alekseev@itep.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/vme/bridges/vme_tsi148.c