mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
greybus: legacy: use protocol pointer to determine state
Use the protocol pointer to determine the legacy connection state. This is needed to allow core disable connections when an interface has been hot-unplugged without the legacy protocols leaking its resources. Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
50dfb87865
commit
01547770e6
1 changed files with 1 additions and 1 deletions
|
|
@ -100,7 +100,7 @@ err_unbind_protocol:
|
|||
|
||||
static void legacy_connection_exit(struct gb_connection *connection)
|
||||
{
|
||||
if (connection->state == GB_CONNECTION_STATE_DISABLED)
|
||||
if (!connection->protocol)
|
||||
return;
|
||||
|
||||
gb_connection_disable(connection);
|
||||
|
|
|
|||
Loading…
Reference in a new issue