Open neheb opened 7 months ago
I'd like to understand the use case of this commit.
There's a use case where reloading the module is a problem. In the case of module unloading, no problem, openwrt continues to work. When the module is reloaded, the kernel crashes without giving any sign of life. This commit does not correct this use case.
ping @robimarko
The use case is that last time I tried to use this driver on Espressobin Ultra with a 88W8897 card it would crash on pci_bus_to_OF_node()
returning NULL
pci_bus_to_OF_node() used to get the PCI bus DT node returns node if found or NULL if none is found.
Since the return of pci_bus_to_OF_node() is not checked in the DT node name print it will cause a null pointer dereference and crash the kernel.
So first check whether the node is not NULL and then print.