aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/cdns3/cdns3-imx.c
diff options
context:
space:
mode:
authorHeikki Krogerus <[email protected]>2022-01-24 12:02:27 +0300
committerGreg Kroah-Hartman <[email protected]>2022-01-25 18:37:35 +0100
commit7817adb03cfb52ebb5bdb25fd9fc8f683a1a09d9 (patch)
treeaefd2203eee5f6c2201424c89fbde495e8813737 /drivers/usb/cdns3/cdns3-imx.c
parent5638b0dfb6921f69943c705383ff40fb64b987f2 (diff)
usb: typec: Only attempt to link USB ports if there is fwnode
The code that creates the links to the USB ports attached to a connector inside the system assumed that the ACPI nodes (fwnodes) always exist for the connectors, but it can not do that. There is no guarantee that every USB Type-C connector has ACPI device node representing it in the ACPI tables, and even if there are the nodes in the ACPI tables, the _STA method in those nodes may still return 0 (which means the device does not exist from ACPI PoW). This fixes NULL pointer dereference that happens if the nodes are missing. Fixes: 730b49aac426 ("usb: typec: port-mapper: Convert to the component framework") Reported-and-tested-by: Robert Święcki <[email protected]> Reported-by: Mikhail Gavrilov <[email protected]> Tested-by: Marc Zyngier <[email protected]> Acked-by: Marc Zyngier <[email protected]> Signed-off-by: Heikki Krogerus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-imx.c')
0 files changed, 0 insertions, 0 deletions