Commit cc44ba91 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Sebastian Reichel

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")
Fixes: 87c2d906 ("power: max77693: Add charger driver for Maxim 77693")
Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
Reviewed-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.co.uk>
parent a427503e
...@@ -567,6 +567,7 @@ static int max77693_set_charge_input_threshold_volt(struct max77693_charger *chg ...@@ -567,6 +567,7 @@ static int max77693_set_charge_input_threshold_volt(struct max77693_charger *chg
case 4800000: case 4800000:
case 4900000: case 4900000:
data = (uvolt - 4700000) / 100000; data = (uvolt - 4700000) / 100000;
break;
default: default:
dev_err(chg->dev, "Wrong value for charge input voltage regulation threshold\n"); dev_err(chg->dev, "Wrong value for charge input voltage regulation threshold\n");
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment