mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
PCI: dw: rockchip: Fix rk_pcie_init_dma_trx
If dma_object is not used, NULL pointer dereference was found.
Fixes: 52729bfaff ("PCI: rockchip: dw: Move dma_obj initialization into rk_pcie_init_dma_trx()")
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I5fe8ec539af1188b5da806026f164a493a577c46
This commit is contained in:
@@ -553,6 +553,8 @@ static int rk_pcie_init_dma_trx(struct rk_pcie *rk_pcie)
|
||||
if (IS_ERR(rk_pcie->dma_obj)) {
|
||||
dev_err(rk_pcie->pci->dev, "failed to prepare dmatest\n");
|
||||
return -EINVAL;
|
||||
} else if (!rk_pcie->dma_obj) { /* !CONFIG_ROCKCHIP_PCIE_DMA_OBJ */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Enable client write and read interrupt */
|
||||
|
||||
Reference in New Issue
Block a user