Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 3b65ca50 authored by Ray Jui's avatar Ray Jui Committed by Lorenzo Pieralisi
Browse files

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: dd9d4e74 ("PCI: iproc: Add inbound DMA mapping support")
Reported-by: default avatarRafał Miłecki <rafal@milecki.pl>
Signed-off-by: default avatarRay Jui <ray.jui@broadcom.com>
[lorenzo.pieralisi@arm.com: updated commit log]
Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tested-by: default avatarRafał Miłecki <rafal@milecki.pl>
cc: <stable@vger.kernel.org> # 4.10+
parent 09b2d203
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment