summaryrefslogtreecommitdiffstats
path: root/drivers/extcon
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2019-10-25 14:12:27 +0100
committerChanwoo Choi <cw00.choi@samsung.com>2019-10-31 13:47:42 +0900
commitddd1bbbae486ff5913c8fc72c853dcea60713236 (patch)
tree36b52432c4bebc4e0fd0b3171fc8def046845c1e /drivers/extcon
parent6942635032cfd3e003e980d2dfa4e6323a3ce145 (diff)
downloadlinux-ddd1bbbae486ff5913c8fc72c853dcea60713236.tar.bz2
extcon: sm5502: remove redundant assignment to variable cable_type
The variable cable_type is being initialized with a value that is never read and is being re-assigned a little later on. The assignment is redundant and hence can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'drivers/extcon')
-rw-r--r--drivers/extcon/extcon-sm5502.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/extcon/extcon-sm5502.c b/drivers/extcon/extcon-sm5502.c
index b3d93baf4fc5..bcf65aaca5d2 100644
--- a/drivers/extcon/extcon-sm5502.c
+++ b/drivers/extcon/extcon-sm5502.c
@@ -276,7 +276,7 @@ static int sm5502_muic_set_path(struct sm5502_muic_info *info,
/* Return cable type of attached or detached accessories */
static unsigned int sm5502_muic_get_cable_type(struct sm5502_muic_info *info)
{
- unsigned int cable_type = -1, adc, dev_type1;
+ unsigned int cable_type, adc, dev_type1;
int ret;
/* Read ADC value according to external cable or button */