diff options
author | Ray Jui <[email protected]> | 2018-01-11 12:36:16 -0800 |
---|---|---|
committer | Lorenzo Pieralisi <[email protected]> | 2018-01-12 10:40:18 +0000 |
commit | 3b65ca50d24ce33cb92d88840e289135c92b40ed (patch) | |
tree | b2b17d3f2c817ebcf7ac146026b27b69b61f6370 /drivers/fpga/altera-ps-spi.c | |
parent | 09b2d20349e37a03a0951ab69524b516c8f1cc5b (diff) |
PCI: iproc: Fix NULL pointer dereference for BCMA
With the inbound DMA mapping supported added, the iProc PCIe driver
parses DT property "dma-ranges" through call to
"of_pci_dma_range_parser_init()". In the case of BCMA, this results in a
NULL pointer deference due to a missing of_node.
Fix this by adding a guard in pcie-iproc-platform.c to only enable the
inbound DMA mapping logic when DT property "dma-ranges" is present.
Fixes: dd9d4e7498de3 ("PCI: iproc: Add inbound DMA mapping support")
Reported-by: Rafał Miłecki <[email protected]>
Signed-off-by: Ray Jui <[email protected]>
[[email protected]: updated commit log]
Signed-off-by: Lorenzo Pieralisi <[email protected]>
Tested-by: Rafał Miłecki <[email protected]>
cc: <[email protected]> # 4.10+
Diffstat (limited to 'drivers/fpga/altera-ps-spi.c')
0 files changed, 0 insertions, 0 deletions