]> git.karo-electronics.de Git - karo-tx-linux.git/commit
greybus: manifest: clean up properly when parsing bundles
authorAlex Elder <elder@linaro.org>
Fri, 12 Jun 2015 15:21:12 +0000 (10:21 -0500)
committerGreg Kroah-Hartman <gregkh@google.com>
Fri, 12 Jun 2015 19:14:24 +0000 (12:14 -0700)
commit2a64fb0e1e13eee53e56805d8a1f0ff7bbf57306
tree1b440616233035f9d97a0da5888114270e5bb3d0
parentfe53b45ca8143e7f1073ff31d7c4cfb4e92dc824
greybus: manifest: clean up properly when parsing bundles

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

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

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