OSDN Git Service

greybus: gpio: fix memory leaks at init and exit
authorJohan Hovold <johan@hovoldconsulting.com>
Fri, 13 Feb 2015 06:58:04 +0000 (14:58 +0800)
committerGreg Kroah-Hartman <greg@kroah.com>
Wed, 18 Feb 2015 00:31:27 +0000 (16:31 -0800)
commit35a64f2c492867e5e404b7620c5784603caae8f1
tree9635a63565f163dfbe7549cb3771b59780b87ff4
parent036aad9d0224f6f29c08abe102df709a27f68c17
greybus: gpio: fix memory leaks at init and exit

Fix three related memory leaks in the init an exit callbacks, where the
gpio-lines array was never freed at all and the controller data wasn't
freed in the init error path.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/gpio.c