lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1432901645-17478-1-git-send-email-ldewangan@nvidia.com>
Date:	Fri, 29 May 2015 17:44:05 +0530
From:	Laxman Dewangan <ldewangan@...dia.com>
To:	<a.zummo@...ertech.it>, <alexandre.belloni@...e-electrons.com>,
	<akpm@...ux-foundation.org>
CC:	<rtc-linux@...glegroups.com>, <linux-kernel@...r.kernel.org>,
	Laxman Dewangan <ldewangan@...dia.com>
Subject: [PATCH] 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@...dia.com>
---
 drivers/rtc/rtc-palmas.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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,
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ