aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2013-08-15 15:26:26 -0400
committerLinus Walleij <linus.walleij@linaro.org>2013-08-15 16:12:46 -0400
commitf84b4171312a59924c22b817c8f83c1749a8e8ba (patch)
treec1a83f5bfe727cef670d96f22e88fb757ec6f624
parenta1bc260bb5f5d95da854be7898202d788e94448d (diff)
pinctrl: nomadik: shut up a warning for flags
The irq flags variable gets a warning like this after commit bf4dae5ce1b95a5932e43036edcf3f1b324758c6 "pinctrl: nomadik: delete ancient pin control API": In file included from include/linux/seqlock.h:29:0, from include/linux/time.h:5, from include/linux/stat.h:18, from include/linux/module.h:10, from drivers/pinctrl/pinctrl-nomadik.c:14: drivers/pinctrl/pinctrl-nomadik.c: In function 'nmk_pmx_enable': include/linux/spinlock.h:348:122: warning: 'flags' may be used uninitialized in this function [-Wmaybe-uninitialized] raw_spin_unlock_irqrestore(&lock->rlock, flags); ^ drivers/pinctrl/pinctrl-nomadik.c:1515:16: note: 'flags' was declared here unsigned long flags; The function is question was never changed but it appears the semantic checker could previously determine that the code path that would use the flags was going to either use it or not, but now it can't for some reason. Just fix it up. Reported-by: Olof Johansson <olof@lixom.net> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--drivers/pinctrl/pinctrl-nomadik.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c
index 89280bc8123c..a8b8a5377b77 100644
--- a/drivers/pinctrl/pinctrl-nomadik.c
+++ b/drivers/pinctrl/pinctrl-nomadik.c
@@ -1512,7 +1512,7 @@ static int nmk_pmx_enable(struct pinctrl_dev *pctldev, unsigned function,
1512 struct nmk_pinctrl *npct = pinctrl_dev_get_drvdata(pctldev); 1512 struct nmk_pinctrl *npct = pinctrl_dev_get_drvdata(pctldev);
1513 const struct nmk_pingroup *g; 1513 const struct nmk_pingroup *g;
1514 static unsigned int slpm[NUM_BANKS]; 1514 static unsigned int slpm[NUM_BANKS];
1515 unsigned long flags; 1515 unsigned long flags = 0;
1516 bool glitch; 1516 bool glitch;
1517 int ret = -EINVAL; 1517 int ret = -EINVAL;
1518 int i; 1518 int i;