tpm: In tpm_get_random() replace 'retries' with a zero check

Check for zero byte read instead of having retries counter in order to make
wait flag properly enforcing. Progress is still guaranteed given the zero
check and iterations are capped up to TPM_MAX_RNG_DATA iterations at most
(as per theoretical limit).

Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
1 file changed