extcon: max77843: signedness bug in max77843_muic_set_debounce_time()
Subsystems (3)
PATCH 1/2 extcon: max77843: signedness bug in max77843_muic_set_debounce_time()
"ret" holds negative error codes and zero so it should be signed.
Fixes 27a28d32b4f2 ('extcon: max77843: Add max77843 MUIC driver')
Signed-off-by Dan Carpenter <[email protected]>
drivers/extcon/extcon-max77843.c +1 -1
@@ -682,7 +682,7 @@ static int max77843_muic_set_debounce_time(struct max77843_muic_info *info, enum max77843_muic_adc_debounce_time time) {struct max77843 *max77843 = info->max77843; -unsigned int ret; +int ret;switch (time) {case MAX77843_DEBOUNCE_TIME_5MS :
Hi Dan,
Quoted 11 lines · Dan Carpenter
"ret" holds negative error codes and zero so it should be signed.
Fixes 27a28d32b4f2 ('extcon: max77843: Add max77843 MUIC driver')Signed-off-by Dan Carpenter <[email protected]>drivers/extcon/extcon-max77843.c +0
-0
drivers/extcon/extcon-max77843.c static int max77843_muic_set_debounce_time(struct max77843_muic_info *info, · line 688
Quoted 8 lines
drivers/extcon/extcon-max77843.c +1
-1@@ -682,7 +682,7 @@ static int max77843_muic_set_debounce_time(struct max77843_muic_info *info, enum max77843_muic_adc_debounce_time time) {struct max77843 *max77843 = info->max77843; -unsigned int ret; +int ret;switch (time) {case MAX77843_DEBOUNCE_TIME_5MS :
Applied it on extcon-next branch.
Thanks,
Chanwoo Choi