diff options
author | Prashant Malani <pmalani@chromium.org> | 2020-07-15 16:49:28 -0700 |
---|---|---|
committer | Enric Balletbo i Serra <enric.balletbo@collabora.com> | 2020-07-20 10:39:53 +0200 |
commit | 698d4d35be34385f0b501dde5ea1071d483c9a22 (patch) | |
tree | 954b3ace5f356b794665e1af03386a206197d5f4 /drivers/platform/chrome/cros_ec_sensorhub_ring.c | |
parent | e48bc01ed5adec203676c735365373b31c3c7600 (diff) |
platform/chrome: cros_ec_typec: Unregister partner on error
When port update is called during probe(), any error with setting the
Type C muxes results in an errno being returned to probe(), which promptly
returns that itself. Ensure that we unregister any registered partners
when doing so, to prevent orphaned partners on the Type C connector
class framework.
Move the cros_typec_add_partner() and cros_typec_remove_partner() code
together to higher up in the file, so that they are together, and we can
call cros_typec_remove_partner() from cros_unregister_ports().
Fixes: 7e7def15fa4b ("platform/chrome: cros_ec_typec: Add USB mux control")
Signed-off-by: Prashant Malani <pmalani@chromium.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Diffstat (limited to 'drivers/platform/chrome/cros_ec_sensorhub_ring.c')
0 files changed, 0 insertions, 0 deletions