diff options
author | Robin Murphy <robin.murphy@arm.com> | 2019-07-04 14:54:12 +0100 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2019-10-08 13:50:22 -0500 |
commit | 76dd7068e32cec3389474d6f69ffd4d0536172da (patch) | |
tree | 21b801e9fdcb9ade42ebc20920d20ea9359893da | |
parent | 6e6faf63744333373db8bc64aea52dab86cbf0bc (diff) |
of: address: Report of_dma_get_range() errors meaningfully
If we failed to translate a DMA address, at least show the offending
address rather than the uninitialised contents of the destination
argument.
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Rob Herring <robh@kernel.org>
-rw-r--r-- | drivers/of/address.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/of/address.c b/drivers/of/address.c index 8e354d12fb04..53d2656c2269 100644 --- a/drivers/of/address.c +++ b/drivers/of/address.c @@ -955,8 +955,8 @@ int of_dma_get_range(struct device_node *np, u64 *dma_addr, u64 *paddr, u64 *siz dmaaddr = of_read_number(ranges, naddr); *paddr = of_translate_dma_address(np, ranges); if (*paddr == OF_BAD_ADDR) { - pr_err("translation of DMA address(%pad) to CPU address failed node(%pOF)\n", - dma_addr, np); + pr_err("translation of DMA address(%llx) to CPU address failed node(%pOF)\n", + dmaaddr, np); ret = -EINVAL; goto out; } |