fnic: check pci_map_single() return value
authorMaurizio Lombardi <mlombard@redhat.com>
Wed, 12 Aug 2015 15:00:23 +0000 (17:00 +0200)
committerJames Bottomley <JBottomley@Odin.com>
Tue, 27 Oct 2015 02:05:45 +0000 (11:05 +0900)
commitfd6ddfa4c1ddfb4a149b31845144b4cf3cbef54d
tree846c774cf5b9bbb0a1991c4770bac1435d76d6ed
parentc4f39bdaf40e2651f4fb3e6944e05166f1ab1d38
fnic: check pci_map_single() return value

the kernel prints some warnings when compiled with CONFIG_DMA_API_DEBUG.
This is because the fnic driver doesn't check the return value of
pci_map_single().

[   11.942770] scsi host12: fnic
[   11.950811] ------------[ cut here ]------------
[   11.950818] WARNING: at lib/dma-debug.c:937 check_unmap+0x47b/0x920()
[   11.950821] fnic 0000:0c:00.0: DMA-API: device driver failed to check map error[device address=0x0000002020a30040] [size=44 bytes] [mapped as single]

Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed By: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
drivers/scsi/fnic/fnic_fcs.c
drivers/scsi/fnic/fnic_scsi.c