[2/2] crypto: ccp - Log an error message when ccp-crypto fails to load
diff mbox series

Message ID 20190710214504.3420-3-gary.hook@amd.com
State Changes Requested
Delegated to: Herbert Xu
Headers show
Series
  • Improve system log messaging in ccp-crypto
Related show

Commit Message

Gary R Hook July 10, 2019, 9:45 p.m. UTC
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
---
 drivers/crypto/ccp/ccp-crypto-main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/drivers/crypto/ccp/ccp-crypto-main.c b/drivers/crypto/ccp/ccp-crypto-main.c
index 44a9917a4a6a..5b61c440dff0 100644
--- a/drivers/crypto/ccp/ccp-crypto-main.c
+++ b/drivers/crypto/ccp/ccp-crypto-main.c
@@ -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);