diff options
author | Corentin Labbe <clabbe@baylibre.com> | 2021-12-14 19:16:29 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-04-08 15:23:12 +0300 |
commit | 0ac903a7bde995f4a08ad406587bef31ef8ece49 (patch) | |
tree | 685e4e80ec78dab4c0135b1edc612354244c234f /drivers/staging | |
parent | b84343a9d6765cfc3298c0de3a0ac623a48d5e55 (diff) | |
download | linux-0ac903a7bde995f4a08ad406587bef31ef8ece49.tar.xz |
media: staging: media: zoran: fix usage of vb2_dma_contig_set_max_seg_size
[ Upstream commit 241f5b67fb48def58643f279dfb8468bdd54b443 ]
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: d4ae3689226e5 ("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>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/media/zoran/zoran_card.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/staging/media/zoran/zoran_card.c b/drivers/staging/media/zoran/zoran_card.c index f259585b0689..c578ef3c32f5 100644 --- a/drivers/staging/media/zoran/zoran_card.c +++ b/drivers/staging/media/zoran/zoran_card.c @@ -1069,8 +1069,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) { |