Commit 82f87f34 authored by Manohar Vanga's avatar Manohar Vanga

kernel: use correct buffer in test_dma()

parent 4f7cfb30
......@@ -356,7 +356,7 @@ static int gn4124_dma_sg(struct fmctdc_dev *ft,
enum gncore_dma_status status;
int mapbytes = 0;
int byteleft = size;
int ret;
int ret = 0;
int n = (size / PAGE_SIZE) + (size % PAGE_SIZE ? 1 : 0);
int i;
void *bufp;
......@@ -452,7 +452,7 @@ out_sg_alloc:
out_dma_item:
kfree(item);
return ret;
return (ret < 0 ? ret : 0);
}
......@@ -506,7 +506,7 @@ int test_dma(struct fmctdc_dev *ft, unsigned int buf_size, unsigned int use_sg)
goto out_buf2;
if (use_sg)
ret = gn4124_dma_sg(ft, 0, buf1, buf_size, DMA_FROM_DEVICE);
ret = gn4124_dma_sg(ft, 0, buf2, buf_size, DMA_FROM_DEVICE);
else
gn4124_dma_read(ft, 0, buf2, buf_size);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment