diff options
author | Yang Li <yang.lee@linux.alibaba.com> | 2021-03-08 14:35:30 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-03-10 09:37:18 +0100 |
commit | 493d0856de5eb9fd040a09475ea2cb5576984a6e (patch) | |
tree | 9fa4bc479ec91633625dd4066d713ee8b018dacf /drivers/usb/typec | |
parent | 19c234a14eafca78e0bc14ffb8be3891096ce147 (diff) |
usb: typec: tcpm: turn tcpm_ams_finish into void function
This function always return '0' and no callers use the return value.
So make it a void function.
This eliminates the following coccicheck warning:
./drivers/usb/typec/tcpm/tcpm.c:778:5-8: Unneeded variable: "ret".
Return "0" on line 794
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Link: https://lore.kernel.org/r/1615185330-118246-1-git-send-email-yang.lee@linux.alibaba.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/typec')
-rw-r--r-- | drivers/usb/typec/tcpm/tcpm.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c index 16bda6cea7b8..11d0c40bc47d 100644 --- a/drivers/usb/typec/tcpm/tcpm.c +++ b/drivers/usb/typec/tcpm/tcpm.c @@ -780,10 +780,8 @@ static enum typec_cc_status tcpm_rp_cc(struct tcpm_port *port) return TYPEC_CC_RP_DEF; } -static int tcpm_ams_finish(struct tcpm_port *port) +static void tcpm_ams_finish(struct tcpm_port *port) { - int ret = 0; - tcpm_log(port, "AMS %s finished", tcpm_ams_str[port->ams]); if (port->pd_capable && port->pwr_role == TYPEC_SOURCE) { @@ -797,8 +795,6 @@ static int tcpm_ams_finish(struct tcpm_port *port) port->in_ams = false; port->ams = NONE_AMS; - - return ret; } static int tcpm_pd_transmit(struct tcpm_port *port, |