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: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
        int ret;
        int irq = 0;
 
-       irq = platform_get_irq(pdev, 0);
-
        stmpe_gpio = kzalloc(sizeof(*stmpe_gpio), GFP_KERNEL);
        if (!stmpe_gpio)
                return -ENOMEM;
        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: "