提交 259a2400 编写于 作者: T Tony Lindgren 提交者: Kishon Vijay Abraham I

phy: cpcap-usb: Fix missing return statement

Commit 8ae904e3c236 ("phy: cpcap-usb: Add CPCAP PMIC USB support")
is missing return statement as noted by Colin Ian King
<colin.king@canonical.com>. If the optional pins are not configured,
we just want to return early and not attempt to configure the pins.

Fixes: 8ae904e3c236 ("phy: cpcap-usb: Add CPCAP PMIC USB support")
Reported-by: NColin Ian King <colin.king@canonical.com>
Signed-off-by: NTony Lindgren <tony@atomide.com>
Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com>
上级 787f2454
...@@ -468,6 +468,8 @@ static int cpcap_usb_init_optional_pins(struct cpcap_phy_ddata *ddata) ...@@ -468,6 +468,8 @@ static int cpcap_usb_init_optional_pins(struct cpcap_phy_ddata *ddata)
dev_info(ddata->dev, "default pins not configured: %ld\n", dev_info(ddata->dev, "default pins not configured: %ld\n",
PTR_ERR(ddata->pins)); PTR_ERR(ddata->pins));
ddata->pins = NULL; ddata->pins = NULL;
return 0;
} }
ddata->pins_ulpi = pinctrl_lookup_state(ddata->pins, "ulpi"); ddata->pins_ulpi = pinctrl_lookup_state(ddata->pins, "ulpi");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册