Staging: rts5208: fix check for dma mapping error

use dma_mapping_error() instead of comparing the returned address with
zero after dma_map_single().

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Haneen Mohammed 2016-02-09 23:03:05 +03:00 committed by Greg Kroah-Hartman
parent ca026a3504
commit 9a66d05d82
1 changed files with 1 additions and 1 deletions

View File

@ -653,7 +653,7 @@ static int rtsx_transfer_buf(struct rtsx_chip *chip, u8 card, void *buf,
return -ENXIO;
addr = dma_map_single(&(rtsx->pci->dev), buf, len, dma_dir);
if (!addr)
if (dma_mapping_error(&rtsx->pci->dev, addr))
return -ENOMEM;
if (card == SD_CARD)