Mario Limonciello cacc6e2293 tpm: Add a helper for checking hwrng enabled
The same checks are repeated in three places to decide whether to use
hwrng.  Consolidate these into a helper.

Also this fixes a case that one of them was missing a check in the
cleanup path.

Fixes: 554b841d4703 ("tpm: Disable RNG for all AMD fTPMs")
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2023-08-09 10:05:15 -07:00
..
2023-04-27 11:53:57 -07:00
2018-06-05 11:24:55 -07:00
2023-05-31 19:17:29 +01:00
2023-03-09 17:30:27 +01:00
2022-04-22 16:24:47 +02:00