crypto: ccp - Log an error message when ccp-crypto fails to load
authorGary R Hook <gary.hook@amd.com>
Mon, 29 Jul 2019 12:56:08 +0000 (12:56 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 9 Aug 2019 05:05:32 +0000 (15:05 +1000)
If there are no CCP devices on the system, ccp-crypto will not load.
Write a message to the system log clarifying the reason for the failure
of the modprobe operation

Signed-off-by: Gary R Hook <gary.hook@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ccp/ccp-crypto-main.c

index 8180964908298774c2fff6b021d9bd3fe68aa88b..8ee4cb45a3f381444bf55e046f26868792b51e5b 100644 (file)
@@ -405,8 +405,10 @@ static int ccp_crypto_init(void)
        int ret;
 
        ret = ccp_present();
-       if (ret)
+       if (ret) {
+               pr_err("Cannot load: there are no available CCPs\n");
                return ret;
+       }
 
        spin_lock_init(&req_queue_lock);
        INIT_LIST_HEAD(&req_queue.cmds);