* [PATCH v3 1/2] usb: typec: tcpci_maxim: remove redundant assignment
@ 2021-01-24 14:38 angkery
2021-01-24 15:43 ` Guenter Roeck
2021-01-25 9:33 ` Heikki Krogerus
0 siblings, 2 replies; 3+ messages in thread
From: angkery @ 2021-01-24 14:38 UTC (permalink / raw)
To: linux, heikki.krogerus, gregkh; +Cc: linux-usb, linux-kernel, Junlin Yang
From: Junlin Yang <yangjunlin@yulong.com>
PTR_ERR(chip->tcpci) has been used as a return value,
it is not necessary to assign it to ret, so remove it.
Signed-off-by: Junlin Yang <yangjunlin@yulong.com>
---
v3:remove the newline modification.
drivers/usb/typec/tcpm/tcpci_maxim.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/usb/typec/tcpm/tcpci_maxim.c b/drivers/usb/typec/tcpm/tcpci_maxim.c
index 3192663..7f54f51a 100644
--- a/drivers/usb/typec/tcpm/tcpci_maxim.c
+++ b/drivers/usb/typec/tcpm/tcpci_maxim.c
@@ -461,7 +461,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);
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v3 1/2] usb: typec: tcpci_maxim: remove redundant assignment
2021-01-24 14:38 [PATCH v3 1/2] usb: typec: tcpci_maxim: remove redundant assignment angkery
@ 2021-01-24 15:43 ` Guenter Roeck
2021-01-25 9:33 ` Heikki Krogerus
1 sibling, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2021-01-24 15:43 UTC (permalink / raw)
To: angkery; +Cc: heikki.krogerus, gregkh, linux-usb, linux-kernel, Junlin Yang
On Sun, Jan 24, 2021 at 10:38:53PM +0800, angkery wrote:
> From: Junlin Yang <yangjunlin@yulong.com>
>
> PTR_ERR(chip->tcpci) has been used as a return value,
> it is not necessary to assign it to ret, so remove it.
>
> Signed-off-by: Junlin Yang <yangjunlin@yulong.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> v3:remove the newline modification.
>
> drivers/usb/typec/tcpm/tcpci_maxim.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/usb/typec/tcpm/tcpci_maxim.c b/drivers/usb/typec/tcpm/tcpci_maxim.c
> index 3192663..7f54f51a 100644
> --- a/drivers/usb/typec/tcpm/tcpci_maxim.c
> +++ b/drivers/usb/typec/tcpm/tcpci_maxim.c
> @@ -461,7 +461,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);
> --
> 1.9.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3 1/2] usb: typec: tcpci_maxim: remove redundant assignment
2021-01-24 14:38 [PATCH v3 1/2] usb: typec: tcpci_maxim: remove redundant assignment angkery
2021-01-24 15:43 ` Guenter Roeck
@ 2021-01-25 9:33 ` Heikki Krogerus
1 sibling, 0 replies; 3+ messages in thread
From: Heikki Krogerus @ 2021-01-25 9:33 UTC (permalink / raw)
To: angkery; +Cc: linux, gregkh, linux-usb, linux-kernel, Junlin Yang
On Sun, Jan 24, 2021 at 10:38:53PM +0800, angkery wrote:
> From: Junlin Yang <yangjunlin@yulong.com>
>
> PTR_ERR(chip->tcpci) has been used as a return value,
> it is not necessary to assign it to ret, so remove it.
>
> Signed-off-by: Junlin Yang <yangjunlin@yulong.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> v3:remove the newline modification.
>
> drivers/usb/typec/tcpm/tcpci_maxim.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/usb/typec/tcpm/tcpci_maxim.c b/drivers/usb/typec/tcpm/tcpci_maxim.c
> index 3192663..7f54f51a 100644
> --- a/drivers/usb/typec/tcpm/tcpci_maxim.c
> +++ b/drivers/usb/typec/tcpm/tcpci_maxim.c
> @@ -461,7 +461,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);
> --
> 1.9.1
thanks,
--
heikki
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-01-25 9:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-24 14:38 [PATCH v3 1/2] usb: typec: tcpci_maxim: remove redundant assignment angkery
2021-01-24 15:43 ` Guenter Roeck
2021-01-25 9:33 ` Heikki Krogerus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).