greybus: fix a leak on error in gb_module_create()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 14 Oct 2016 19:18:21 +0000 (22:18 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Oct 2016 13:51:00 +0000 (15:51 +0200)
commite866dd8aab76b6a0ee8428491e65fa5c83a6ae5a
tree7c266a7c306f343c123ac75433cf0c673a28b1c6
parent1305f2b2f52af5986f44dfbb1a6fe58ae875aa61
greybus: fix a leak on error in gb_module_create()

We should release ->interfaces[0] as well.

Fixes: b15d97d77017 ("greybus: core: add module abstraction")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/greybus/module.c