From: Jingoo Han Date: Wed, 20 Feb 2013 02:53:36 +0000 (+0900) Subject: mfd: wm8994: Silence bogus warning in wm8994_device_init() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=222bc784dcdc62d9402c580502d579914dbf07bc;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git mfd: wm8994: Silence bogus warning in wm8994_device_init() 'patch_regs' cannot be used uninitialized in wm8994_device_init(), because 'patch_regs' was already guarded by 'regmap_patch'. Thus, that's a bogus warning. Without this patch, the build warning happens as below: drivers/mfd/wm8994-core.c: In function 'wm8994_i2c_probe': drivers/mfd/wm8994-core.c:595:7: warning: 'patch_regs' may be used uninitialized in this function [-Wuninitialized] drivers/mfd/wm8994-core.c:408:14: note: 'patch_regs' was declared here Signed-off-by: Jingoo Han Acked-by: Mark Brown Signed-off-by: Samuel Ortiz --- diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c index 803e93fae56a..97e929e76810 100644 --- a/drivers/mfd/wm8994-core.c +++ b/drivers/mfd/wm8994-core.c @@ -405,7 +405,7 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq) struct regmap_config *regmap_config; const struct reg_default *regmap_patch = NULL; const char *devname; - int ret, i, patch_regs; + int ret, i, patch_regs = 0; int pulls = 0; if (dev_get_platdata(wm8994->dev)) {