From 95e99651a23c1ccc103007c3b0532ff97d7c357d Mon Sep 17 00:00:00 2001 From: leoliu-oc Date: Mon, 2 Sep 2024 17:11:48 +0800 Subject: [PATCH] zhaoxin_rng: Remove redundant pr_err log after matching cpu_ids On non-Zhaoxin platforms, log related to the zhaoxin rng driver should not appear. Signed-off-by: leoliu-oc --- drivers/char/hw_random/zhaoxin-rng.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/char/hw_random/zhaoxin-rng.c b/drivers/char/hw_random/zhaoxin-rng.c index f0bfda78fea1..e265d45dfc48 100644 --- a/drivers/char/hw_random/zhaoxin-rng.c +++ b/drivers/char/hw_random/zhaoxin-rng.c @@ -71,10 +71,8 @@ static int __init zhaoxin_rng_mod_init(void) { int err; - if (!x86_match_cpu(zhaoxin_rng_cpu_ids)) { - pr_err(PFX "The CPU isn't support XSTORE.\n"); + if (!x86_match_cpu(zhaoxin_rng_cpu_ids)) return -ENODEV; - } pr_info("Zhaoxin RNG detected\n");