Re: [PATCH v2 net-next] net: dsa: Add error path handling in dsa_tree_setup()

2019-05-30 Thread Andrew Lunn
On Thu, May 30, 2019 at 09:09:07AM +0300, Ioana Ciornei wrote: > In case a call to dsa_tree_setup() fails, an attempt to cleanup is made > by calling dsa_tree_remove_switch(), which should take care of > removing/unregistering any resources previously allocated. This does not > happen because it is

[PATCH v2 net-next] net: dsa: Add error path handling in dsa_tree_setup()

2019-05-29 Thread Ioana Ciornei
In case a call to dsa_tree_setup() fails, an attempt to cleanup is made by calling dsa_tree_remove_switch(), which should take care of removing/unregistering any resources previously allocated. This does not happen because it is conditioned by dst->setup being true, which is set only after _all_ se