usb: typec-mux: nb7vpq904m: unregister typec switch on probe error and remove
authorNeil Armstrong <neil.armstrong@linaro.org>
Thu, 6 Jun 2024 13:11:14 +0000 (15:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Jun 2024 17:32:13 +0000 (19:32 +0200)
commit74b64e760ee3433c0f8d95715038c869bcddacf7
tree729c1fdd3f862b232de444cde7c8a089b54b8bc5
parent2be53b0436fda455e1bf6968ebae53f5d4f3cb0b
usb: typec-mux: nb7vpq904m: unregister typec switch on probe error and remove

Add the missing call to typec_switch_put() when probe fails and
the nb7vpq904m_remove() call is called.

Fixes: 348359e7c232 ("usb: typec: nb7vpq904m: Add an error handling path in nb7vpq904m_probe()")
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Fixes: 88d8f3ac9c67 ("usb: typec: add support for the nb7vpq904m Type-C Linear Redriver")
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20240606-topic-sm8x50-upstream-retimer-broadcast-mode-v2-2-c6f6eae479c3@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/mux/nb7vpq904m.c