Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Gary R Hook and committed by
Herbert Xu
30b4c54c f2339eb9

+3 -4
+3 -4
drivers/crypto/ccp/ccp-debugfs.c
··· 297 297 return; 298 298 299 299 write_lock_irqsave(&ccp_debugfs_lock, flags); 300 - if (!ccp_debugfs_dir) { 300 + if (!ccp_debugfs_dir) 301 301 ccp_debugfs_dir = debugfs_create_dir(KBUILD_MODNAME, NULL); 302 - if (!ccp_debugfs_dir) 303 - return; 304 - } 305 302 write_unlock_irqrestore(&ccp_debugfs_lock, flags); 303 + if (!ccp_debugfs_dir) 304 + return; 306 305 307 306 ccp->debugfs_instance = debugfs_create_dir(ccp->name, ccp_debugfs_dir); 308 307 if (!ccp->debugfs_instance)