Files
linux/drivers/usb/typec
Arnaud Ferraris 1366cd228b tcpm: allow looking for role_sw device in the main node
If ports are defined in the tcpc main node, fwnode_usb_role_switch_get()
returns an error, meaning usb_role_switch_get() (which would succeed)
never gets a chance to run as port->role_sw isn't NULL, causing a
regression on devices where this is the case.

Fix this by turning the NULL check into IS_ERR_OR_NULL(), so
usb_role_switch_get() can actually run and the device get properly probed.

Fixes: 2d8713f807 ("tcpm: switch check for role_sw device with fw_node")
Cc: stable <[email protected]>
Reviewed-by: Heikki Krogerus <[email protected]>
Reviewed-by: Dragan Simic <[email protected]>
Signed-off-by: Arnaud Ferraris <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2026-01-07 16:28:05 +01:00
..
…
…
…
…
…
…
…