phy: cpcap-usb: Fix error path when no host driver is loaded
authorTony Lindgren <tony@atomide.com>
Fri, 20 Dec 2019 10:51:40 +0000 (16:21 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jan 2020 19:07:08 +0000 (20:07 +0100)
commit99b79d4811ce1abdab5965400ae64b512502b62c
tree403b536b2b75bee4c679904ad0b4e9715467d10d
parent1a4da00e9af21ef982efaccfde2736f0a5cf645a
phy: cpcap-usb: Fix error path when no host driver is loaded

commit 4acb0200ab2b07843e3ef5599add3454c7440f03 upstream.

If musb_mailbox() returns an error, we must still continue to finish
configuring the phy.

Otherwise the phy state may end up only half initialized, and this can
cause the debug serial console to stop working. And this will happen if the
usb driver musb controller is not loaded.

Let's fix the issue by adding helper for cpcap_usb_try_musb_mailbox().

Fixes: 6d6ce40f63af ("phy: cpcap-usb: Add CPCAP PMIC USB support")
Cc: Merlijn Wajer <merlijn@wizzup.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/phy/motorola/phy-cpcap-usb.c