[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180717214739.GA19410@embeddedor.com>
Date: Tue, 17 Jul 2018 16:47:39 -0500
From: "Gustavo A. R. Silva" <gustavo@...eddedor.com>
To: Krzysztof Kozlowski <krzk@...nel.org>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
Sebastian Reichel <sre@...nel.org>
Cc: linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
"Gustavo A. R. Silva" <gustavo@...eddedor.com>
Subject: [PATCH] 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: 87c2d9067893 ("power: max77693: Add charger driver for Maxim 77693")
Signed-off-by: Gustavo A. R. Silva <gustavo@...eddedor.com>
---
drivers/power/supply/max77693_charger.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/power/supply/max77693_charger.c b/drivers/power/supply/max77693_charger.c
index 6c78884..749c792 100644
--- a/drivers/power/supply/max77693_charger.c
+++ b/drivers/power/supply/max77693_charger.c
@@ -567,6 +567,7 @@ static int max77693_set_charge_input_threshold_volt(struct max77693_charger *chg
case 4800000:
case 4900000:
data = (uvolt - 4700000) / 100000;
+ break;
default:
dev_err(chg->dev, "Wrong value for charge input voltage regulation threshold\n");
return -EINVAL;
--
2.7.4
Powered by blists - more mailing lists