提交 241f5b67 编写于 作者: C Corentin Labbe 提交者: Mauro Carvalho Chehab

media: staging: media: zoran: fix usage of vb2_dma_contig_set_max_seg_size

vb2_dma_contig_set_max_seg_size need to have a size in parameter and not
a DMA_BIT_MASK().
While fixing this issue, also fix error handling of all DMA size
setting.
Reported-by: Nkernel test robot <lkp@intel.com>
Fixes: d4ae3689 ("media: zoran: device support only 32bit DMA address")
Signed-off-by: NCorentin Labbe <clabbe@baylibre.com>
Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: NMauro Carvalho Chehab <mchehab@kernel.org>
上级 8f7cc5c0
......@@ -1282,8 +1282,10 @@ static int zoran_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
if (err)
return -ENODEV;
vb2_dma_contig_set_max_seg_size(&pdev->dev, DMA_BIT_MASK(32));
return err;
err = vb2_dma_contig_set_max_seg_size(&pdev->dev, U32_MAX);
if (err)
return err;
nr = zoran_num++;
if (nr >= BUZ_MAX) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部