diff options
author | Haneen Mohammed <hamohammed.sa@gmail.com> | 2016-02-09 20:03:05 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-10 01:43:09 (GMT) |
commit | 9a66d05d82db0404cf39669052a1cb0da608873c (patch) | |
tree | 09dd997e8b5bbca3f6b6f7c9f4ea55bf3d20846f /drivers/staging/rts5208/rtsx_transport.c | |
parent | ca026a3504c2033821b672a09b26d467ae017eb2 (diff) | |
download | linux-9a66d05d82db0404cf39669052a1cb0da608873c.tar.xz |
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>
Diffstat (limited to 'drivers/staging/rts5208/rtsx_transport.c')
-rw-r--r-- | drivers/staging/rts5208/rtsx_transport.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rts5208/rtsx_transport.c b/drivers/staging/rts5208/rtsx_transport.c index f27491e..0c9549b 100644 --- a/drivers/staging/rts5208/rtsx_transport.c +++ b/drivers/staging/rts5208/rtsx_transport.c @@ -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) |