power: supply: max77693_charger: fix unintentional fall-through
PATCH 1/1 power: supply: max77693_charger: fix unintentional fall-through
It seems that a *break* is missing in order to avoid a fall-through. Otherwise, the calculation of *data* makes no sense.
Addresses-Coverity-ID: 1271172 ("Missing break in switch")
--- drivers/power/supply/max77693_charger.c | 1 + 1 file changed, 1 insertion(+)
drivers/power/supply/max77693_charger.c +1 -0
@@ -567,6 +567,7 @@ static int max77693_set_charge_input_threshold_volt(struct max77693_charger *chgcase 4800000 :case 4900000 : data = (uvolt -4700000 ) /100000 ; +break ;default :dev_err (chg->dev,"Wrong value for charge input voltage regulation threshold\n" );return -EINVAL ;
Signature · 1 line
2.7.4
Quoted 9 lines · Gustavo A. R. Silva
It seems that a *break* is missing in order to avoid a fall-through. Otherwise, the calculation of *data* makes no sense.
Addresses-Coverity-ID: 1271172 ("Missing break in switch")
Fixes 87c2d9067893 ("power: max77693: Add charger driver for Maxim 77693")Signed-off-by Gustavo A. R. Silva <[email protected]>--- drivers/power/supply/max77693_charger.c | 1 + 1 file changed, 1 insertion(+)
Best regards,
Krzysztof
Hi Krzysztof,
Quoted 4 lines · Krzysztof Kozlowski
Quoted 3 lines · Gustavo A. R. Silva
It seems that a *break* is missing in order to avoid a fall-through. Otherwise, the calculation of *data* makes no sense.
Quoted 9 lines
Quoted 6 lines
Addresses-Coverity-ID: 1271172 ("Missing break in switch")
Fixes 87c2d9067893 ("power: max77693: Add charger driver for Maxim 77693")Signed-off-by Gustavo A. R. Silva <[email protected]>--- drivers/power/supply/max77693_charger.c | 1 + 1 file changed, 1 insertion(+)Reviewed-by Krzysztof Kozlowski <[email protected]>
BTW, I think this also should be tagged for stable.
Thanks
--
Gustavo
Hi,
Quoted 4 lines · Krzysztof Kozlowski
Quoted 3 lines · Gustavo A. R. Silva
It seems that a *break* is missing in order to avoid a fall-through. Otherwise, the calculation of *data* makes no sense.
Quoted 8 lines
Quoted 6 lines
Addresses-Coverity-ID: 1271172 ("Missing break in switch")
Fixes 87c2d9067893 ("power: max77693: Add charger driver for Maxim 77693")Signed-off-by Gustavo A. R. Silva <[email protected]>--- drivers/power/supply/max77693_charger.c | 1 + 1 file changed, 1 insertion(+)Reviewed-by Krzysztof Kozlowski <[email protected]>
Thanks, queued to power-supply's fixes branch.
-- Sebastian
Hi Sebastian,
Quoted 14 lines · Sebastian Reichel
Hi,
Quoted 11 lines · Krzysztof Kozlowski
Quoted 9 lines · Gustavo A. R. Silva
It seems that a *break* is missing in order to avoid a fall-through. Otherwise, the calculation of *data* makes no sense.
Addresses-Coverity-ID: 1271172 ("Missing break in switch")
Fixes 87c2d9067893 ("power: max77693: Add charger driver for Maxim 77693")Signed-off-by Gustavo A. R. Silva <[email protected]>--- drivers/power/supply/max77693_charger.c | 1 + 1 file changed, 1 insertion(+)
Quoted 4 lines
Quoted 1 line
Reviewed-by Krzysztof Kozlowski <[email protected]>Thanks, queued to power-supply's fixes branch.
I think this should be tagged for stable.
Thanks
--
Gustavo