Skip to content

Commit c42a012

Browse files
author
Christoph Hellwig
committed
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: Christoph Hellwig <[email protected]> Reviewed-by: Robin Murphy <[email protected]> Reviewed-by: Martin K. Petersen <[email protected]>
1 parent b5a73bf commit c42a012

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

include/linux/dma-mapping.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -575,13 +575,12 @@ static inline unsigned int dma_get_min_align_mask(struct device *dev)
575575
return 0;
576576
}
577577

578-
static inline int dma_set_min_align_mask(struct device *dev,
578+
static inline void dma_set_min_align_mask(struct device *dev,
579579
unsigned int min_align_mask)
580580
{
581581
if (WARN_ON_ONCE(!dev->dma_parms))
582-
return -EIO;
582+
return;
583583
dev->dma_parms->min_align_mask = min_align_mask;
584-
return 0;
585584
}
586585

587586
#ifndef dma_get_cache_alignment

0 commit comments

Comments
 (0)