diff options
author | Lee Jones <lee.jones@linaro.org> | 2013-12-03 04:26:33 -0500 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2014-01-21 03:27:47 -0500 |
commit | 4db59238906becd0047aba8293b25591dd0d018a (patch) | |
tree | 0adaf1a6f8e309ecd58ed6851a47fdc0fc78a5c1 /drivers/mfd | |
parent | 36fcd06c4638acacee7135906cab60f11ea1ffac (diff) |
mfd: rtsx: Prevent 'used uninitialised' warnings
drivers/mfd/rtl8411.c: In function 'rtl8411_fetch_vendor_settings':
drivers/mfd/rtl8411.c:58:7: warning: 'reg1' is used uninitialized in this function [-Wuninitialized]
drivers/mfd/rtl8411.c: In function 'rtl8411b_fetch_vendor_settings':
drivers/mfd/rtl8411.c:79:7: warning: 'reg' is used uninitialized in this function [-Wuninitialized]
drivers/mfd/rtl8411.c: In function 'rtl8411_fetch_vendor_settings':
drivers/mfd/rtl8411.c:69:26: warning: 'reg3' may be used uninitialized in this function [-Wuninitialized]
Tested-by: Micky Ching <micky_ching@realsil.com.cn>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/rtl8411.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mfd/rtl8411.c b/drivers/mfd/rtl8411.c index 52801351864d..1ee867591ee4 100644 --- a/drivers/mfd/rtl8411.c +++ b/drivers/mfd/rtl8411.c | |||
@@ -49,8 +49,8 @@ static int rtl8411b_is_qfn48(struct rtsx_pcr *pcr) | |||
49 | 49 | ||
50 | static void rtl8411_fetch_vendor_settings(struct rtsx_pcr *pcr) | 50 | static void rtl8411_fetch_vendor_settings(struct rtsx_pcr *pcr) |
51 | { | 51 | { |
52 | u32 reg1; | 52 | u32 reg1 = 0; |
53 | u8 reg3; | 53 | u8 reg3 = 0; |
54 | 54 | ||
55 | rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG1, ®1); | 55 | rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG1, ®1); |
56 | dev_dbg(&(pcr->pci->dev), "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG1, reg1); | 56 | 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) | |||
71 | 71 | ||
72 | static void rtl8411b_fetch_vendor_settings(struct rtsx_pcr *pcr) | 72 | static void rtl8411b_fetch_vendor_settings(struct rtsx_pcr *pcr) |
73 | { | 73 | { |
74 | u32 reg; | 74 | u32 reg = 0; |
75 | 75 | ||
76 | rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG1, ®); | 76 | rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG1, ®); |
77 | dev_dbg(&(pcr->pci->dev), "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG1, reg); | 77 | dev_dbg(&(pcr->pci->dev), "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG1, reg); |