Commit c42a0126 authored by Christoph Hellwig's avatar Christoph Hellwig

dma-mapping: don't return errors from dma_set_min_align_mask

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: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarRobin Murphy <robin.murphy@arm.com>
Reviewed-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent b5a73bf4
......@@ -575,13 +575,12 @@ static inline unsigned int dma_get_min_align_mask(struct device *dev)
return 0;
}
static inline int dma_set_min_align_mask(struct device *dev,
static inline void dma_set_min_align_mask(struct device *dev,
unsigned int min_align_mask)
{
if (WARN_ON_ONCE(!dev->dma_parms))
return -EIO;
return;
dev->dma_parms->min_align_mask = min_align_mask;
return 0;
}
#ifndef dma_get_cache_alignment
......
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