Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Laxman Dewangan and committed by
Alexandre Belloni
d200c79b e044253b

+1 -1
+1 -1
drivers/rtc/rtc-palmas.c
··· 239 239 struct palmas_rtc *palmas_rtc = NULL; 240 240 int ret; 241 241 bool enable_bb_charging = false; 242 - bool high_bb_charging; 242 + bool high_bb_charging = false; 243 243 244 244 if (pdev->dev.of_node) { 245 245 enable_bb_charging = of_property_read_bool(pdev->dev.of_node,