OSDN Git Service

greybus: enforce non-zero operation type requirement
authorAlex Elder <elder@linaro.org>
Tue, 2 Dec 2014 14:30:31 +0000 (08:30 -0600)
committerGreg Kroah-Hartman <greg@kroah.com>
Tue, 2 Dec 2014 22:35:33 +0000 (14:35 -0800)
commit55f66a88dbd718c2133ac759eee4ff51f516bf45
treeedfc7885c7f61c84dadadcb2c988e498fb48dd35
parent64ce39a3463776a6ccf6770f588a265bca2468ca
greybus: enforce non-zero operation type requirement

The operation type 0x00 is reserved as an explicitly invalid
operation type in all protocols.  Enforce this.

Add a check for callers who erroneously have the RESPONSE message
type flag set in the operation type passed in gb_operation_create().

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/operation.c