dma-mapping: don't BUG when calling dma_map_resource on RAM
authorChristoph Hellwig <hch@lst.de>
Fri, 4 Jan 2019 16:17:53 +0000 (17:17 +0100)
committerChristoph Hellwig <hch@lst.de>
Fri, 1 Feb 2019 08:56:38 +0000 (09:56 +0100)
commit645386dfe6307dbb28f10a4513792a59beda0efa
tree32166531d281cf857a6bb73a22b0cb4c0e0c12d1
parentcfced786969c2a3e1bca45d7055a00311d93ae6c
dma-mapping: don't BUG when calling dma_map_resource on RAM

Use WARN_ON_ONCE to print a stack trace and return a proper error
code instead.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
include/linux/dma-mapping.h