mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 06:31:49 +00:00
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:
parent
ca026a3504
commit
9a66d05d82
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user