diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c index 3ec984c8d7e5..46e259f05a55 100644 --- a/drivers/staging/greybus/connection.c +++ b/drivers/staging/greybus/connection.c @@ -298,6 +298,10 @@ void gb_connection_exit(struct gb_connection *connection) dev_warn(&connection->dev, "exit without protocol.\n"); return; } + + if (connection->state != GB_CONNECTION_STATE_ENABLED) + return; + connection->state = GB_CONNECTION_STATE_DESTROYING; connection->protocol->connection_exit(connection); }