]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
usb: typec: tcpci_maxim: remove redundant assignment
authorJunlin Yang <yangjunlin@yulong.com>
Sun, 24 Jan 2021 14:38:53 +0000 (22:38 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Jul 2025 16:27:38 +0000 (18:27 +0200)
[ Upstream commit a63b53e19bdffd9338fab4536e8bc422ea812b4d ]

PTR_ERR(chip->tcpci) has been used as a return value,
it is not necessary to assign it to ret, so remove it.

Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Junlin Yang <yangjunlin@yulong.com>
Link: https://lore.kernel.org/r/20210124143853.1630-1-angkery@163.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stable-dep-of: 0736299d090f ("usb: typec: tcpm/tcpci_maxim: Fix bounds check in process_rx()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/typec/tcpm/tcpci_maxim.c

index 6bf0d1ebc1faeb8c78adc1f0ce6e4336f4c4d88b..57c5c073139a9c176859540efb3586a30751b99f 100644 (file)
@@ -446,7 +446,6 @@ static int max_tcpci_probe(struct i2c_client *client, const struct i2c_device_id
        chip->tcpci = tcpci_register_port(chip->dev, &chip->data);
        if (IS_ERR(chip->tcpci)) {
                dev_err(&client->dev, "TCPCI port registration failed");
-               ret = PTR_ERR(chip->tcpci);
                return PTR_ERR(chip->tcpci);
        }
        chip->port = tcpci_get_tcpm_port(chip->tcpci);