Commit cacc6e2
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: 554b841 ("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>1 parent 2288397 commit cacc6e2
1 file changed
Lines changed: 14 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
521 | 521 | | |
522 | 522 | | |
523 | 523 | | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
524 | 535 | | |
525 | 536 | | |
526 | | - | |
527 | | - | |
| 537 | + | |
528 | 538 | | |
529 | 539 | | |
530 | 540 | | |
| |||
629 | 639 | | |
630 | 640 | | |
631 | 641 | | |
632 | | - | |
| 642 | + | |
633 | 643 | | |
634 | 644 | | |
635 | 645 | | |
| |||
654 | 664 | | |
655 | 665 | | |
656 | 666 | | |
657 | | - | |
658 | | - | |
| 667 | + | |
659 | 668 | | |
660 | 669 | | |
661 | 670 | | |
| |||
0 commit comments