Input: gpio_keys - fix warning regarding uninitialized 'irq' variable
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 8 Dec 2014 06:42:45 +0000 (22:42 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 8 Dec 2014 07:07:07 +0000 (23:07 -0800)
commitaf906faabcf91eb12397d8954f89e289a8b96af5
tree60ae6bb24d6f8a323e68a42d29e91144c22ecdf0
parent823a11fdbde32f9efba48093dca74fe81010a265
Input: gpio_keys - fix warning regarding uninitialized  'irq' variable

Commit f2d347ff70be453e ("Input: gpio_keys - add device tree support for
interrupt only keys") caused the following build warning:

drivers/input/keyboard/gpio_keys.c: In function 'gpio_keys_probe':
drivers/input/keyboard/gpio_keys.c:647:15: warning: 'irq' may be used uninitialized in this function [-Wmaybe-uninitialized]
drivers/input/keyboard/gpio_keys.c:622:7: note: 'irq' was declared here

Move button->irq initialization into proper branch and get rid of the
temporary.

Reported-by: Olof's autobuilder <build@lixom.net>
Reported-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/keyboard/gpio_keys.c