summaryrefslogtreecommitdiff
path: root/drivers/rng/smccc_trng.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rng/smccc_trng.c')
-rw-r--r--drivers/rng/smccc_trng.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rng/smccc_trng.c b/drivers/rng/smccc_trng.c
index 5bb7ebe8a49..f59b80666b3 100644
--- a/drivers/rng/smccc_trng.c
+++ b/drivers/rng/smccc_trng.c
@@ -165,7 +165,7 @@ static int smccc_trng_probe(struct udevice *dev)
struct smccc_trng_priv *priv = dev_get_priv(dev);
struct arm_smccc_res res;
- if (!(smccc_trng_is_supported(smccc->invoke_fn)))
+ if (!smccc || !(smccc_trng_is_supported(smccc->invoke_fn)))
return -ENODEV;
/* At least one of 64bit and 32bit interfaces is available */