mirror of
https://github.com/torvalds/linux.git
synced 2026-06-06 21:45:45 +02:00
media: staging: media: zoran: fix usage of vb2_dma_contig_set_max_seg_size
[ Upstream commit241f5b67fb] 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: kernel test robot <lkp@intel.com> Fixes:d4ae368922("media: zoran: device support only 32bit DMA address") Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
f622bd0758
commit
c76188715d
|
|
@ -1068,8 +1068,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));
|
err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
|
||||||
if (err)
|
if (err)
|
||||||
return -ENODEV;
|
return err;
|
||||||
vb2_dma_contig_set_max_seg_size(&pdev->dev, DMA_BIT_MASK(32));
|
err = vb2_dma_contig_set_max_seg_size(&pdev->dev, U32_MAX);
|
||||||
|
if (err)
|
||||||
|
return err;
|
||||||
|
|
||||||
nr = zoran_num++;
|
nr = zoran_num++;
|
||||||
if (nr >= BUZ_MAX) {
|
if (nr >= BUZ_MAX) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user