From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755999AbbE2MQf (ORCPT ); Fri, 29 May 2015 08:16:35 -0400 Received: from hqemgate14.nvidia.com ([216.228.121.143]:4107 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753782AbbE2MQ0 convert rfc822-to-8bit (ORCPT ); Fri, 29 May 2015 08:16:26 -0400 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Fri, 29 May 2015 05:13:00 -0700 From: Laxman Dewangan To: , , CC: , , Laxman Dewangan Subject: [PATCH] rtc: palmas: Initialise bb_charging flag before using it Date: Fri, 29 May 2015 17:44:05 +0530 Message-ID: <1432901645-17478-1-git-send-email-ldewangan@nvidia.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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