mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-03 09:41:54 +09: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:
committed by
Greg Kroah-Hartman
parent
50dfb87865
commit
01547770e6
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user