Commit e0f14b8c authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

Pull crypto fix from Herbert Xu:
 "Fix a potential crash in the ccp driver"

* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: ccp - Ignore unconfigured CCP device on suspend/resume
parents ab9bb631 5871cd93
......@@ -540,6 +540,10 @@ int ccp_dev_suspend(struct sp_device *sp, pm_message_t state)
unsigned long flags;
unsigned int i;
/* If there's no device there's nothing to do */
if (!ccp)
return 0;
spin_lock_irqsave(&ccp->cmd_lock, flags);
ccp->suspending = 1;
......@@ -564,6 +568,10 @@ int ccp_dev_resume(struct sp_device *sp)
unsigned long flags;
unsigned int i;
/* If there's no device there's nothing to do */
if (!ccp)
return 0;
spin_lock_irqsave(&ccp->cmd_lock, flags);
ccp->suspending = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment