Otherwise, the probe would be considered successfully, and without
do any destroy jobs, eg, the interrupt has still registered.
Acked-by: Jun Li <jun.li@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
static int tcpci_parse_config(struct tcpci *tcpci)
{
struct tcpc_config *tcfg;
- int ret = 0;
+ int ret = -EINVAL;
tcpci->controls_vbus = true; /* XXX */
device_property_read_u32(tcpci->dev, "max-snk-mw",
&tcfg->max_snk_mw) ||
device_property_read_u32(tcpci->dev, "op-snk-mw",
- &tcfg->operating_snk_mw))
+ &tcfg->operating_snk_mw)) {
+ ret = -EINVAL;
goto snk_setting_wrong;
+ }
return 0;