]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
PCI: cadence: Check for the existence of cdns_pcie::ops before using it
authorChen Wang <unicorn_wang@outlook.com>
Fri, 12 Sep 2025 02:36:01 +0000 (10:36 +0800)
committerManivannan Sadhasivam <mani@kernel.org>
Fri, 19 Sep 2025 18:09:38 +0000 (23:39 +0530)
commit49a6c160ad4812476f8ae1a8f4ed6d15adfa6c09
tree7bc21a8cb4ce0b0bffc017fcf1bcc346a46470f5
parent4e4a4f58bed19e1a3a5a7c3a18ce3b927b76fcd3
PCI: cadence: Check for the existence of cdns_pcie::ops before using it

cdns_pcie::ops might not be populated by all the Cadence glue drivers. This
is going to be true for the upcoming Sophgo platform which doesn't set the
ops.

Hence, add a check to prevent NULL pointer dereference.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
[mani: reworded subject and description]
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Link: https://patch.msgid.link/35182ee1d972dfcd093a964e11205efcebbdc044.1757643388.git.unicorn_wang@outlook.com
drivers/pci/controller/cadence/pcie-cadence-host.c
drivers/pci/controller/cadence/pcie-cadence.c
drivers/pci/controller/cadence/pcie-cadence.h