OSDN Git Service

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)
committerKishon Vijay Abraham I <kishon@ti.com>
Fri, 20 Dec 2019 11:29:28 +0000 (16:59 +0530)
commit4acb0200ab2b07843e3ef5599add3454c7440f03
treeec0cc8ced6c6846feade2c7742e20032ddbbabcc
parente42617b825f8073569da76dc4510bfa019b1c35a
phy: cpcap-usb: Fix error path when no host driver is loaded

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>
drivers/phy/motorola/phy-cpcap-usb.c