tpm2: refactor tpm2 return value processing

There is no point in checking and reporting error code in each
function calling tpm_process_command(), let's do it in one place for
all commands.

BRANCH=none
BUG=chrome-os-partner:50645
TEST=Kevin still boots to chrome os

Change-Id: I10f45bd15df293f63401c295c5dce833543c50da
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/358174
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Darren Krahn <dkrahn@chromium.org>
(cherry picked from commit 452973e5f45014162c273e13ad973d38f58404b0)
Reviewed-on: https://chromium-review.googlesource.com/358932
Reviewed-by: Bernie Thompson <bhthompson@chromium.org>
Commit-Queue: Bernie Thompson <bhthompson@chromium.org>
Tested-by: Bernie Thompson <bhthompson@chromium.org>
1 file changed