I/OAT: fix dma_pin_iovec_pages() error handling
authorMaciej Sosnowski <maciej.sosnowski@intel.com>
Tue, 11 Nov 2008 17:50:07 +0000 (17:50 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 13 Nov 2008 17:56:00 +0000 (09:56 -0800)
commit33cfbb0629d7e08875f23ceeff21c4067a0937e5
tree7ced2a307949c8500ad719fdf8f33d9206bd75b5
parentfaa895b7004d19540d6da360b8e9ae22119aa61d
I/OAT: fix dma_pin_iovec_pages() error handling

commit c2c0b4c5434c0a25f7f7796b29155d53805909f5 upstream

Error handling needs to be modified in dma_pin_iovec_pages().
It should return NULL instead of ERR_PTR
(pinned_list is checked for NULL in tcp_recvmsg() to determine
if iovec pages have been successfully pinned down).
In case of error for the first iovec,
local_list->nr_iovecs needs to be initialized.

Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/dma/iovlock.c