summaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2015-05-29 17:44:05 +0530
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>2015-06-25 01:13:40 +0200
commitd200c79b1ad1fa76feb5e0991d11f3edfe9960de (patch)
treec2aa29276368e6fa285cb90fbf188095a8900311 /drivers/rtc
parente044253b3b4fb5a8b275202511a4d9765ac0a982 (diff)
downloadop-kernel-dev-d200c79b1ad1fa76feb5e0991d11f3edfe9960de.zip
op-kernel-dev-d200c79b1ad1fa76feb5e0991d11f3edfe9960de.tar.gz
rtc: palmas: Initialise bb_charging flag before using it
Initialise the variable high_bb_charging before using it to avoid configuring wrong value and fix following compilation warning: /* rtc-palmas.c: In function ‘palmas_rtc_probe’: rtc-palmas.c:242:7: warning: ‘high_bb_charging’ may be used uninitialized in this function */ Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-palmas.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-palmas.c b/drivers/rtc/rtc-palmas.c
index 3b01d56..7ea2c47 100644
--- a/drivers/rtc/rtc-palmas.c
+++ b/drivers/rtc/rtc-palmas.c
@@ -239,7 +239,7 @@ static int palmas_rtc_probe(struct platform_device *pdev)
struct palmas_rtc *palmas_rtc = NULL;
int ret;
bool enable_bb_charging = false;
- bool high_bb_charging;
+ bool high_bb_charging = false;
if (pdev->dev.of_node) {
enable_bb_charging = of_property_read_bool(pdev->dev.of_node,
OpenPOWER on IntegriCloud