Commit 9a66d05d authored by Haneen Mohammed's avatar Haneen Mohammed Committed by Greg Kroah-Hartman

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: default avatarHaneen Mohammed <hamohammed.sa@gmail.com>
Acked-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ca026a35
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment