lkml.org 
[lkml]   [2016]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 9/9] Staging: rts5208: Add missing dma_mapping_error
Date
This patch adds a dma_mapping_error call to debug potential DMA mapping
errors after the dma_map_single call in rtsx_transport.c.

Signed-off-by: Shaun Ren <shaun.ren@linux.com>
---
drivers/staging/rts5208/rtsx_transport.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rts5208/rtsx_transport.c b/drivers/staging/rts5208/rtsx_transport.c
index c0fd8c5..00da7ab 100644
--- a/drivers/staging/rts5208/rtsx_transport.c
+++ b/drivers/staging/rts5208/rtsx_transport.c
@@ -664,7 +664,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)
--
2.7.0
\
 
 \ /
  Last update: 2016-02-09 02:41    [W:0.197 / U:9.904 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site