On 8/29/2025 5:43 AM, Bjorn Helgaas wrote:
On Thu, Aug 28, 2025 at 10:17:17AM +0800, Chen Wang wrote:
From: Chen Wang <unicorn_wang@xxxxxxxxxxx>
ops of struct cdns_pcie may be NULL, direct use
will result in a null pointer error.
Add checking of pcie->ops before using it.
Fixes: 40d957e6f9eb ("PCI: cadence: Add support to start link and verify link status")
Do you observe this NULL pointer dereference with an existing driver?
If this is only to make it possible to add a new driver that doesn't
supply a pcie->ops pointer, it doesn't need a Fixes: tag because
there's not a problem with existing drivers and this change would not
need to be backported.
If it *is* a problem with an existing driver, please point out which
one.
No, the existing driver does not have this problem. Only my newly added
driver doesn't supply a pcie->ops pointer.
I will remove this Fixes tag in next revision.
Thanks,
Chen
[......]