Re: [PATCH] PCI: designware-ep: Fix NULL pointer dereference error

From: Rob Herring
Date: Fri Mar 05 2021 - 11:20:50 EST


On Thu, Mar 4, 2021 at 8:59 PM Kishon Vijay Abraham I <kishon@xxxxxx> wrote:
>
> commit 281f1f99cf3a ("PCI: dwc: Detect number of iATU windows") detected
> the number of inbound and outbound windows dynamically at runtime in
> dw_pcie_setup(). However pcie-designware-ep.c accessed the variables
> holding the number of inbound and outbound windows even before
> dw_pcie_setup() was invoked. Fix the sequence here.
>
> Fixes: 281f1f99cf3a ("PCI: dwc: Detect number of iATU windows")
> Signed-off-by: Kishon Vijay Abraham I <kishon@xxxxxx>
> ---
> .../pci/controller/dwc/pcie-designware-ep.c | 44 ++++++++++---------
> 1 file changed, 23 insertions(+), 21 deletions(-)

There's already another fix posted. I prodded Bjorn to apply it.

Rob