Fix -Werror=unused-but-set-variable warnings in gcc 4.6

As warning-as-error was enabled, unused-but-set local variable
breaks the build in gcc 4.6 . This CL add a return code check in
TPM_CMK_ApproveMA after verify authorization.

BUG=None
TEST=emerge tpm-emulator under gcc 4.6 toolchain

Change-Id: I540d0a7b1b5190ab6bb4a2432e87263050ef3bc9
Reviewed-on: https://gerrit.chromium.org/gerrit/12677
Tested-by: Rong Chang <rongchang@chromium.org>
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
diff --git a/tpm/tpm_migration.c b/tpm/tpm_migration.c
index f9157fc..5087696 100644
--- a/tpm/tpm_migration.c
+++ b/tpm/tpm_migration.c
@@ -389,6 +389,7 @@
   info("TPM_CMK_ApproveMA()");
   /* verify authorization */
   res = tpm_verify_auth(auth1, tpmData.permanent.data.ownerAuth, TPM_KH_OWNER);
+  if (res != TPM_SUCCESS) return res;
   /* create hmac of a TPM_CMK_MA_APPROVAL structure */
   buf[0] = (TPM_TAG_CMK_MA_APPROVAL >> 8) & 0xff;
   buf[1] = TPM_TAG_CMK_MA_APPROVAL & 0xff;