Skip to content
Commit 70a9f4d2 authored by Patrick Delaunay's avatar Patrick Delaunay Committed by Tom Rini
Browse files

lib: uuid: fix the test on RNG device presence



Correct the test on RNG device presence,when ret is equal to 0,
before to call dm_rng_read function.

Without this patch the RNG device is not used when present (when ret == 0)
or a data abort occurs in dm_rng_read when CONFIG_DM_RNG is activated but
the RNG device is not present in device tree (ret != 0 and devp = NULL).

Fixes: 92fdad28 ("lib: uuid: use RNG device if present")
CC: Matthias Brugger <mbrugger@suse.com>
CC: Torsten Duwe <duwe@suse.de>
Signed-off-by: default avatarPatrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent 5d39c932
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment