]> git.baikalelectronics.ru Git - kernel.git/commit
tty: serial: max310x: Check return code of gpiochip_remove
authorEmil Goode <emilgoode@gmail.com>
Sat, 18 Aug 2012 16:12:48 +0000 (18:12 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Sep 2012 19:33:40 +0000 (12:33 -0700)
commite6e9d7d3feb2ffe629b729123a982be0135136e2
tree74e01f0e6225d3a5193cbd3b665b0ffeeec364a5
parent77a2468d2480684160a6b42a863bab95e152d03a
tty: serial: max310x: Check return code of gpiochip_remove

The gpiochip_remove function may fail to remove a gpio_chip
if any GPIOs are still requested. This patch informs the caller
of such a senario.

Sparse is warning because the function prototype has a
__must_check annotation.

Sparse warning:
drivers/tty/serial/max310x.c:1223:18: warning:
ignoring return value of ‘gpiochip_remove’,
declared with attribute warn_unused_result
[-Wunused-result]

Signed-off-by: Emil Goode <emilgoode@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/max310x.c