[4/4] gpio-stmpe: Delete an unnecessary variable initialisation in stmpe_gpio_probe()

Message ID 245fffed-3b76-5265-25b1-9f9077518894@users.sourceforge.net
State New
Headers show
Series
  • gpio-stmpe: Adjustments for two function implementations
Related show

Commit Message

SF Markus Elfring Jan. 12, 2018, 8:04 p.m.
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 12 Jan 2018 20:48:40 +0100

The local variable "irq" will eventually be set to an appropriate value
a bit later. Thus omit the explicit initialisation at the beginning.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/gpio/gpio-stmpe.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Linus Walleij Jan. 16, 2018, 10:04 a.m. | #1
On Fri, Jan 12, 2018 at 9:04 PM, SF Markus Elfring
<elfring@users.sourceforge.net> wrote:

> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Fri, 12 Jan 2018 20:48:40 +0100
>
> The local variable "irq" will eventually be set to an appropriate value
> a bit later. Thus omit the explicit initialisation at the beginning.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>

Patch applied.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/gpio/gpio-stmpe.c b/drivers/gpio/gpio-stmpe.c
index d51e27eb1c59..d9f370bf460d 100644
--- a/drivers/gpio/gpio-stmpe.c
+++ b/drivers/gpio/gpio-stmpe.c
@@ -432,8 +432,7 @@  static int stmpe_gpio_probe(struct platform_device *pdev)
 	struct stmpe *stmpe = dev_get_drvdata(pdev->dev.parent);
 	struct device_node *np = pdev->dev.of_node;
 	struct stmpe_gpio *stmpe_gpio;
-	int ret;
-	int irq = 0;
+	int ret, irq;
 
 	stmpe_gpio = kzalloc(sizeof(*stmpe_gpio), GFP_KERNEL);
 	if (!stmpe_gpio)