From: Haneen Mohammed Date: Tue, 9 Feb 2016 20:03:05 +0000 (+0300) Subject: Staging: rts5208: fix check for dma mapping error X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=9a66d05d82db0404cf39669052a1cb0da608873c;p=openwrt%2Fstaging%2Fblogic.git 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 Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rts5208/rtsx_transport.c b/drivers/staging/rts5208/rtsx_transport.c index f27491e802ed..0c9549bae986 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)