Skip to content

Commit 66ab631

Browse files
iomartinChristoph Hellwig
authored andcommitted
dma-mapping: return error code from dma_dummy_map_sg()
The .map_sg() op now expects an error code instead of zero on failure. The only errno to return is -EINVAL in the case when DMA is not supported. Signed-off-by: Martin Oliveira <[email protected]> Signed-off-by: Logan Gunthorpe <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
1 parent 183dc86 commit 66ab631

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/dma/dummy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ static int dma_dummy_map_sg(struct device *dev, struct scatterlist *sgl,
2222
int nelems, enum dma_data_direction dir,
2323
unsigned long attrs)
2424
{
25-
return 0;
25+
return -EINVAL;
2626
}
2727

2828
static int dma_dummy_supported(struct device *hwdev, u64 mask)

0 commit comments

Comments
 (0)