[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1401627240-16524-1-git-send-email-rickard_strandqvist@spectrumdigital.se>
Date: Sun, 1 Jun 2014 14:54:00 +0200
From: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
To: Linus Walleij <linus.walleij@...aro.org>,
Grant Likely <grant.likely@...aro.org>
Cc: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>,
Rob Herring <robh+dt@...nel.org>, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org
Subject: [PATCH] pinctrl: pinctrl-abx500.c: Cleaning up uninitialized variables
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
---
drivers/pinctrl/pinctrl-abx500.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/pinctrl-abx500.c b/drivers/pinctrl/pinctrl-abx500.c
index 163da9c..57802be 100644
--- a/drivers/pinctrl/pinctrl-abx500.c
+++ b/drivers/pinctrl/pinctrl-abx500.c
@@ -164,7 +164,7 @@ static int abx500_gpio_set_bits(struct gpio_chip *chip, u8 reg,
static int abx500_gpio_get(struct gpio_chip *chip, unsigned offset)
{
struct abx500_pinctrl *pct = to_abx500_pinctrl(chip);
- bool bit;
+ bool bit = 0;
bool is_out;
u8 gpio_offset = offset - 1;
int ret;
--
1.7.10.4
--
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