[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a94db6f718e42afbe363af2fc0f006c92f223e54.1384503048.git.micky_ching@realsil.com.cn>
Date: Fri, 15 Nov 2013 16:34:13 +0800
From: <micky_ching@...lsil.com.cn>
To: <sameo@...ux.intel.com>
CC: <devel@...uxdriverproject.org>, <linux-kernel@...r.kernel.org>,
<gregkh@...uxfoundation.org>, <wei_wang@...lsil.com.cn>,
<rogerable@...ltek.com>, Lee Jones <lee.jones@...aro.org>,
Micky Ching <micky_ching@...lsil.com.cn>
Subject: [PATCH 3/3] mfd: rtsx: Prevent 'used uninitialised' warnings
From: Lee Jones <lee.jones@...aro.org>
drivers/mfd/rtl8411.c: In function .-F¡rtl8411_fetch_vendor_settings¢:.-A
drivers/mfd/rtl8411.c:58:7: warning: .-F¡reg1¢ is used uninitialized in this function [-Wuninitialized].-A
drivers/mfd/rtl8411.c: In function .-F¡rtl8411b_fetch_vendor_settings¢:.-A
drivers/mfd/rtl8411.c:79:7: warning: .-F¡reg¢ is used uninitialized in this function [-Wuninitialized].-A
drivers/mfd/rtl8411.c: In function .-F¡rtl8411_fetch_vendor_settings¢:.-A
drivers/mfd/rtl8411.c:69:26: warning: .-F¡reg3¢ may be used uninitialized in this function [-Wuninitialized].-A
Signed-off-by: Lee Jones <lee.jones@...aro.org>
Signed-off-by: Micky Ching <micky_ching@...lsil.com.cn>
---
drivers/mfd/rtl8411.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/mfd/rtl8411.c b/drivers/mfd/rtl8411.c
index 8e4b546..948b5c7 100644
--- a/drivers/mfd/rtl8411.c
+++ b/drivers/mfd/rtl8411.c
@@ -49,8 +49,8 @@ static int rtl8411b_is_qfn48(struct rtsx_pcr *pcr)
static void rtl8411_fetch_vendor_settings(struct rtsx_pcr *pcr)
{
- u32 reg1;
- u8 reg3;
+ u32 reg1 = 0;
+ u8 reg3 = 0;
rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG1, ®1);
dev_dbg(&(pcr->pci->dev), "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG1, reg1);
@@ -71,7 +71,7 @@ static void rtl8411_fetch_vendor_settings(struct rtsx_pcr *pcr)
static void rtl8411b_fetch_vendor_settings(struct rtsx_pcr *pcr)
{
- u32 reg;
+ u32 reg = 0;
rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG1, ®);
dev_dbg(&(pcr->pci->dev), "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG1, reg);
--
1.7.9.5
--
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