summaryrefslogtreecommitdiffstats
path: root/SecurityPkg/RandomNumberGenerator/RngDxe/Rand
diff options
context:
space:
mode:
authorPierre Gondois <Pierre.Gondois@arm.com>2022-10-28 17:32:53 +0200
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-11-06 16:32:28 +0000
commit199031b2b0233652ad5d5fdf73f0f44c0f264d55 (patch)
tree187bb004d85a22fde6ae7410f979e95acece2fcc /SecurityPkg/RandomNumberGenerator/RngDxe/Rand
parent922bf317f1731554b3e77a0a48033a38fdc75a77 (diff)
downloadedk2-199031b2b0233652ad5d5fdf73f0f44c0f264d55.tar.gz
edk2-199031b2b0233652ad5d5fdf73f0f44c0f264d55.tar.bz2
edk2-199031b2b0233652ad5d5fdf73f0f44c0f264d55.zip
SecurityPkg/RngDxe: Documentation/include/parameter cleanup
This patch: -Update RngGetBytes() documentation to align the function definition and declaration. -Improve input parameter checking. Even though 'This' it is not used, the parameter should always point to the current EFI_RNG_PROTOCOL. -Removes TimerLib inclusion as unused. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com> Acked-by: Jiewen Yao <jiewen.yao@intel.com>
Diffstat (limited to 'SecurityPkg/RandomNumberGenerator/RngDxe/Rand')
-rw-r--r--SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RngDxe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RngDxe.c b/SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RngDxe.c
index b2d2236380..8f5d8e740f 100644
--- a/SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RngDxe.c
+++ b/SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RngDxe.c
@@ -59,7 +59,7 @@ RngGetRNG (
{
EFI_STATUS Status;
- if ((RNGValueLength == 0) || (RNGValue == NULL)) {
+ if ((This == NULL) || (RNGValueLength == 0) || (RNGValue == NULL)) {
return EFI_INVALID_PARAMETER;
}