[PATCH] tpm: fix error handling