From d200c79b1ad1fa76feb5e0991d11f3edfe9960de Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Fri, 29 May 2015 17:44:05 +0530 Subject: rtc: palmas: Initialise bb_charging flag before using it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-palmas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/rtc/rtc-palmas.c') diff --git a/drivers/rtc/rtc-palmas.c b/drivers/rtc/rtc-palmas.c index 3b01d567496d..7ea2c471feca 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, -- cgit