Re: [PATCH] PCI: Fix to avoid potential NULL pointer dereference

2019-03-18 Thread Jisheng Zhang
On Mon, 18 Mar 2019 19:26:30 -0500 Aditya Pakki wrote: > > In gen_pci_probe, of_match_node can return a NULL pointer in case of This could not happen. If the probe is called, it means OF registered a device with a valid compatible string, so of_match_node cannot be NULL. > failure. The patch

[PATCH] PCI: Fix to avoid potential NULL pointer dereference

2019-03-18 Thread Aditya Pakki
In gen_pci_probe, of_match_node can return a NULL pointer in case of failure. The patch avoids a NULL pointer dereference in such a scenario. Signed-off-by: Aditya Pakki --- drivers/pci/controller/pci-host-generic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git