intel_th: sth: Sanitize packet callback's return values
authorAlexander Shishkin <alexander.shishkin@linux.intel.com>
Mon, 15 Feb 2016 17:11:58 +0000 (19:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Feb 2016 22:09:14 +0000 (14:09 -0800)
commit97007500ec3f9b08913ebec986068b9d250a6eed
tree798be73b21b415367120196171e936b2bca1ff06
parent2bed074aade2caa9c350121837c55189a8fd197e
intel_th: sth: Sanitize packet callback's return values

According to the stm class interface, the packet callback should return
an error if it is asked to generate packets that it doesn't support.
When it succeeds, it should return number of bytes consumed from its
payload. Currently, for FLAG packet it mistakenly returns 1.

This patch addresses these issues.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwtracing/intel_th/sth.c