]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
greybus: manifest: clean up properly when parsing cports
authorAlex Elder <elder@linaro.org>
Fri, 12 Jun 2015 15:21:09 +0000 (10:21 -0500)
committerGreg Kroah-Hartman <gregkh@google.com>
Fri, 12 Jun 2015 19:14:24 +0000 (12:14 -0700)
commit52e8ce317fe51dea86777b164b63e41e50f8a7bf
tree5d41433a8462a7174d12ff129cc9e0421c6cd03a
parentf9b0366f16c3926e92e7d108fe8666fac671d026
greybus: manifest: clean up properly when parsing cports

Currently, if an error occurs creating a connection, we simply
return an error without cleaning up any of the connections that
had already been successfully set up.

Add code to destroy connections that have been created in the event
an error occurs.  Add a check to ensure the bundle's list of
connections was empty before parsing for CPorts begins.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/manifest.c