OSDN Git Service

greybus: operation: fix cancellation of responses
authorJohan Hovold <johan@hovoldconsulting.com>
Wed, 1 Jul 2015 10:37:31 +0000 (12:37 +0200)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 1 Jul 2015 23:54:44 +0000 (16:54 -0700)
commit188f9785cfc5b1dc306ef1ca36e4c8dd203ccf56
tree48625836ba9355f70408665962729dfd16b40eb0
parentfde7382b47c5fbb64be81420d267f1e314cfee94
greybus: operation: fix cancellation of responses

An operation with a response in-flight will already have set the
operation result and would therefore never be cancelled by the current
implementation.

Note that the reference taken when sending the result will be dropped
in the message completion callback.

Also note that an incoming, non-unidirectional messages will always have
an allocated response if its result has been set.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/operation.c