usb: typec: nb7vpq904m: Add an error handling path in nb7vpq904m_probe()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Tue, 18 Jul 2023 21:40:05 +0000 (23:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Aug 2023 12:56:07 +0000 (14:56 +0200)
commit348359e7c232adc153ed7ec9a157f22d68d29860
tree75ef55cd0d7c66ba051033e8786997d5016891c2
parent5a5ccd61cfd76156cb3e0373c300c509d05448ce
usb: typec: nb7vpq904m: Add an error handling path in nb7vpq904m_probe()

In case of error in the nb7vpq904m_probe() probe function, some resources
need to be freed, as already done in the remove function.

Add the missing error handling path and adjust code accordingly.

Fixes: 88d8f3ac9c67 ("usb: typec: add support for the nb7vpq904m Type-C Linear Redriver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/9118954765821ea9f1179883602b4eca63e91749.1689716381.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/mux/nb7vpq904m.c