irda: vlsi_ir: fix check for DMA mapping errors
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Fri, 24 Mar 2017 22:48:08 +0000 (01:48 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Dec 2017 13:22:12 +0000 (14:22 +0100)
commit3af547339068ce25c67b3c29844f966dfdaaa50e
treef8b9cf3755f5bb268bf809f18bae90a770ab6da6
parent52cd7920b7ac2617ffbfd6912e6488a0d3e34042
irda: vlsi_ir: fix check for DMA mapping errors

[ Upstream commit 6ac3b77a6ffff7513ff86b684aa256ea01c0e5b5 ]

vlsi_alloc_ring() checks for DMA mapping errors by comparing
returned address with zero, while pci_dma_mapping_error() should be used.

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

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/irda/vlsi_ir.c