diff options
author | Johan Hovold <johan@hovoldconsulting.com> | 2016-05-27 17:26:33 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-05-27 12:21:16 -0700 |
commit | 8890f95710d835ba9f843c7dd849858da1d847d8 (patch) | |
tree | d0dfde9bd680809d6d71d51046951890e8046a0d /drivers | |
parent | 1430cc920ab374a94f3a31574a2d616dd7f4c4d1 (diff) | |
download | op-kernel-dev-8890f95710d835ba9f843c7dd849858da1d847d8.zip op-kernel-dev-8890f95710d835ba9f843c7dd849858da1d847d8.tar.gz |
greybus: operation: clean up early connection-state check
Now that the legacy invalid state is gone, clean up the early
connection-state check in the receive path and explicitly drop incoming
messages for disabled connection.
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/greybus/operation.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/greybus/operation.c b/drivers/staging/greybus/operation.c index 20a8d74..aaa1345 100644 --- a/drivers/staging/greybus/operation.c +++ b/drivers/staging/greybus/operation.c @@ -968,8 +968,7 @@ void gb_connection_recv(struct gb_connection *connection, size_t msg_size; u16 operation_id; - if ((connection->state != GB_CONNECTION_STATE_ENABLED && - connection->state != GB_CONNECTION_STATE_ENABLED_TX) || + if (connection->state == GB_CONNECTION_STATE_DISABLED || gb_connection_is_offloaded(connection)) { dev_warn_ratelimited(dev, "%s: dropping %zu received bytes\n", connection->name, size); |