Commit 5089b3d
PCI: endpoint: epf-mhi: Avoid NULL dereference if DT lacks 'mmio'
If platform_get_resource_byname() fails and returns NULL because DT lacks
an 'mmio' property for the MHI endpoint, dereferencing res->start will
cause a NULL pointer access. Add a check to prevent it.
Fixes: 1bf5f25 ("PCI: endpoint: Add PCI Endpoint function driver for MHI bus")
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Zhongqiu Han <[email protected]>
[kwilczynski: error message update per the review feedback]
Signed-off-by: Krzysztof Wilczyński <[email protected]>
[bhelgaas: commit log]
Signed-off-by: Bjorn Helgaas <[email protected]>
Reviewed-by: Niklas Cassel <[email protected]>1 parent 9b80bdb commit 5089b3d
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
867 | 867 | | |
868 | 868 | | |
869 | 869 | | |
| 870 | + | |
870 | 871 | | |
871 | 872 | | |
872 | 873 | | |
873 | 874 | | |
874 | 875 | | |
875 | 876 | | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
876 | 882 | | |
877 | 883 | | |
878 | 884 | | |
| |||
0 commit comments