aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rapidio/devices/rio_mport_cdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rapidio/devices/rio_mport_cdev.c')
-rw-r--r--drivers/rapidio/devices/rio_mport_cdev.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/rapidio/devices/rio_mport_cdev.c b/drivers/rapidio/devices/rio_mport_cdev.c
index 665d9e94a7e1..ec4bc1515f0d 100644
--- a/drivers/rapidio/devices/rio_mport_cdev.c
+++ b/drivers/rapidio/devices/rio_mport_cdev.c
@@ -959,9 +959,10 @@ rio_dma_transfer(struct file *filp, u32 transfer_mode,
nents = dma_map_sg(chan->device->dev,
req->sgt.sgl, req->sgt.nents, dir);
- if (nents == -EFAULT) {
+ if (nents == 0) {
rmcd_error("Failed to map SG list");
- return -EFAULT;
+ ret = -EFAULT;
+ goto err_pg;
}
ret = do_dma_request(req, xfer, sync, nents);