Commit 65337a68 authored by Federico Vaga's avatar Federico Vaga

drv: check return error code

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent afadd4cb
......@@ -325,11 +325,10 @@ static int zfad_dma_prep_slave_sg(struct dma_chan *dchan,
max_segment_size = dma_get_max_seg_size(dchan->device->dev);
max_segment_size &= PAGE_MASK; /* to make alloc_table happy */
/* With some version we cannot use the version from the Linux kernel */
fa->sg_alloc_table_from_pages(&zfad_block->sgt, pages, nr_pages,
offset_in_page(zfad_block->block->data),
zfad_block->block->datalen,
max_segment_size, GFP_KERNEL);
err = fa->sg_alloc_table_from_pages(&zfad_block->sgt, pages, nr_pages,
offset_in_page(zfad_block->block->data),
zfad_block->block->datalen,
max_segment_size, GFP_KERNEL);
if (unlikely(err))
goto err_sgt;
......
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