diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2022-07-21 10:12:01 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-07-27 15:27:53 +0300 |
commit | d183a57cad920087a770c45721e98f45feea0fde (patch) | |
tree | 1400019578d8095179482dfdb899d205b490c56a /drivers/usb/typec/anx7411.c | |
parent | 5cda657679f8fcb2896e4ac0aa8e231f12f9fb04 (diff) | |
download | linux-d183a57cad920087a770c45721e98f45feea0fde.tar.xz |
usb: typec: anx7411: Fix error return code in anx7411_i2c_probe()
Add mising error return code when failed to get interrupt or failed
to register psy.
Fixes: fe6d8a9c8e64 ("usb: typec: anx7411: Add Analogix PD ANX7411 support")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220721071201.269344-3-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/typec/anx7411.c')
-rw-r--r-- | drivers/usb/typec/anx7411.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/typec/anx7411.c b/drivers/usb/typec/anx7411.c index 7692e26911b7..f8baa1e189b3 100644 --- a/drivers/usb/typec/anx7411.c +++ b/drivers/usb/typec/anx7411.c @@ -1483,12 +1483,14 @@ static int anx7411_i2c_probe(struct i2c_client *client, if (!plat->intp_irq) { dev_err(dev, "fail to get interrupt IRQ\n"); + ret = -EINVAL; goto free_typec_port; } plat->dev = dev; plat->psy_online = ANX7411_PSY_OFFLINE; - if (anx7411_psy_register(plat)) { + ret = anx7411_psy_register(plat); + if (ret) { dev_err(dev, "register psy\n"); goto free_typec_port; } |