diff options
author | Christoph Hellwig <hch@lst.de> | 2024-07-19 06:07:38 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2024-08-29 07:22:49 +0300 |
commit | 334304ac2baca7f3e821c47cf5129d90e7a6b1e6 (patch) | |
tree | 97bf1f87e108962f636331aa4f9ac4b0a5627a96 /drivers/media | |
parent | 560a861ab4174b42240157ab5cebe36b8c7bc418 (diff) | |
download | lwn-334304ac2baca7f3e821c47cf5129d90e7a6b1e6.tar.gz lwn-334304ac2baca7f3e821c47cf5129d90e7a6b1e6.zip |
dma-mapping: don't return errors from dma_set_max_seg_size
A NULL dev->dma_parms indicates either a bus that is not DMA capable or
grave bug in the implementation of the bus code.
There isn't much the driver can do in terms of error handling for either
case, so just warn and continue as DMA operations will fail anyway.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org> # For MMC
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/common/videobuf2/videobuf2-dma-contig.c | 3 | ||||
-rw-r--r-- | drivers/media/pci/intel/ipu6/ipu6.c | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/drivers/media/common/videobuf2/videobuf2-dma-contig.c b/drivers/media/common/videobuf2/videobuf2-dma-contig.c index 3d4fd4ef5310..bb0b7fa67b53 100644 --- a/drivers/media/common/videobuf2/videobuf2-dma-contig.c +++ b/drivers/media/common/videobuf2/videobuf2-dma-contig.c @@ -854,8 +854,7 @@ int vb2_dma_contig_set_max_seg_size(struct device *dev, unsigned int size) return -ENODEV; } if (dma_get_max_seg_size(dev) < size) - return dma_set_max_seg_size(dev, size); - + dma_set_max_seg_size(dev, size); return 0; } EXPORT_SYMBOL_GPL(vb2_dma_contig_set_max_seg_size); diff --git a/drivers/media/pci/intel/ipu6/ipu6.c b/drivers/media/pci/intel/ipu6/ipu6.c index bbd646378ab3..83e70c692d95 100644 --- a/drivers/media/pci/intel/ipu6/ipu6.c +++ b/drivers/media/pci/intel/ipu6/ipu6.c @@ -576,9 +576,7 @@ static int ipu6_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) if (ret) return dev_err_probe(dev, ret, "Failed to set DMA mask\n"); - ret = dma_set_max_seg_size(dev, UINT_MAX); - if (ret) - return dev_err_probe(dev, ret, "Failed to set max_seg_size\n"); + dma_set_max_seg_size(dev, UINT_MAX); ret = ipu6_pci_config_setup(pdev, isp->hw_ver); if (ret) |