提交 d200c79b 编写于 作者: L Laxman Dewangan 提交者: Alexandre Belloni

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: NLaxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
上级 e044253b
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册