From: Guenter Roeck <linux@roeck-us.net>
To: angkery <angkery@163.com>,
heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Junlin Yang <yangjunlin@yulong.com>
Subject: Re: [PATCH] usb: typec: tcpci_maxim: remove redundant assignment
Date: Sat, 23 Jan 2021 06:30:03 -0800 [thread overview]
Message-ID: <7b3b495d-38a9-a6b1-e60f-ac8796f9f268@roeck-us.net> (raw)
In-Reply-To: <20210123101410.1354-1-angkery@163.com>
On 1/23/21 2:14 AM, 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>
> ---
> 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);
>
next prev parent reply other threads:[~2021-01-23 14:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-23 10:14 angkery
2021-01-23 14:30 ` Guenter Roeck [this message]
2021-01-23 18:23 ` Joe Perches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7b3b495d-38a9-a6b1-e60f-ac8796f9f268@roeck-us.net \
--to=linux@roeck-us.net \
--cc=angkery@163.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=yangjunlin@yulong.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®