Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 757ad058 authored by Markus Elfring's avatar Markus Elfring Committed by Linus Walleij
Browse files

gpio: stmpe: Move an assignment in stmpe_gpio_probe()



Move the assignment for the local variable "irq" so that its setting
will only be performed directly before it is checked by this function.

Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 64fec0bc
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -435,8 +435,6 @@ static int stmpe_gpio_probe(struct platform_device *pdev)
	int ret;
	int irq = 0;

	irq = platform_get_irq(pdev, 0);

	stmpe_gpio = kzalloc(sizeof(*stmpe_gpio), GFP_KERNEL);
	if (!stmpe_gpio)
		return -ENOMEM;
@@ -459,6 +457,7 @@ static int stmpe_gpio_probe(struct platform_device *pdev)
	if (stmpe_gpio->norequest_mask)
		stmpe_gpio->chip.irq.need_valid_mask = true;

	irq = platform_get_irq(pdev, 0);
	if (irq < 0)
		dev_info(&pdev->dev,
			"device configured in no-irq mode: "