diff options
author | Gary R Hook <gary.hook@amd.com> | 2017-06-19 13:31:17 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-06-22 04:54:09 -0400 |
commit | 30b4c54ccdebfc5a0210d9a4d77cc3671c9d1576 (patch) | |
tree | 7b4cc0c05baa47e39360dd72b15411f46001f35c | |
parent | f2339eb9b9b01c6728ed36c274ca381bc6c452c0 (diff) |
crypto: ccp - Release locks before returning
krobot warning: make sure that all error return paths release locks.
Signed-off-by: Gary R Hook <gary.hook@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r-- | drivers/crypto/ccp/ccp-debugfs.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/crypto/ccp/ccp-debugfs.c b/drivers/crypto/ccp/ccp-debugfs.c index 6d86693b117f..3cd6c83754e0 100644 --- a/drivers/crypto/ccp/ccp-debugfs.c +++ b/drivers/crypto/ccp/ccp-debugfs.c | |||
@@ -297,12 +297,11 @@ void ccp5_debugfs_setup(struct ccp_device *ccp) | |||
297 | return; | 297 | return; |
298 | 298 | ||
299 | write_lock_irqsave(&ccp_debugfs_lock, flags); | 299 | write_lock_irqsave(&ccp_debugfs_lock, flags); |
300 | if (!ccp_debugfs_dir) { | 300 | if (!ccp_debugfs_dir) |
301 | ccp_debugfs_dir = debugfs_create_dir(KBUILD_MODNAME, NULL); | 301 | ccp_debugfs_dir = debugfs_create_dir(KBUILD_MODNAME, NULL); |
302 | if (!ccp_debugfs_dir) | ||
303 | return; | ||
304 | } | ||
305 | write_unlock_irqrestore(&ccp_debugfs_lock, flags); | 302 | write_unlock_irqrestore(&ccp_debugfs_lock, flags); |
303 | if (!ccp_debugfs_dir) | ||
304 | return; | ||
306 | 305 | ||
307 | ccp->debugfs_instance = debugfs_create_dir(ccp->name, ccp_debugfs_dir); | 306 | ccp->debugfs_instance = debugfs_create_dir(ccp->name, ccp_debugfs_dir); |
308 | if (!ccp->debugfs_instance) | 307 | if (!ccp->debugfs_instance) |