mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
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>
This commit is contained in:
parent
6e6faf6374
commit
76dd7068e3
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue