greybus: connection: verify disabled when destroyed
authorAlex Elder <elder@linaro.org>
Tue, 17 May 2016 14:13:16 +0000 (09:13 -0500)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 18 May 2016 23:38:11 +0000 (16:38 -0700)
commit814ae531d161d789496503969657ea9550e286b5
tree76ff5bc52de022c44403859e1535279ff47eee59
parentac00154a7c6a8f3b2a98c1cf3cef893af2b0abac
greybus: connection: verify disabled when destroyed

A connection must be in DISABLED state before it gets destroyed.
Warn if this is ever not the case (and do the disconnect) before
proceeding with connection destruction.

Signed-off-by: Alex Elder <elder@linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/connection.c