diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/uuid.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/uuid.c b/lib/uuid.c index 67267c66a3c..e4703dce2b5 100644 --- a/lib/uuid.c +++ b/lib/uuid.c @@ -257,7 +257,7 @@ void gen_rand_uuid(unsigned char *uuid_bin) if (IS_ENABLED(CONFIG_DM_RNG)) { ret = uclass_get_device(UCLASS_RNG, 0, &devp); - if (ret) { + if (!ret) { ret = dm_rng_read(devp, &randv, sizeof(randv)); if (ret < 0) randv = 0; |