crypto: nx - move kzalloc() out of spinlock
authorDan Streetman <ddstreet@ieee.org>
Wed, 22 Jul 2015 18:26:33 +0000 (14:26 -0400)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 23 Jul 2015 10:14:30 +0000 (18:14 +0800)
commit7f6e3aad5ab31c310b36bf0edcd305305b20e2a8
treefbf9d3ddc0e990c2dac76192b7b346a7fdbf6b3d
parent90fd73f912f0897bc22351b55925a4962c045086
crypto: nx - move kzalloc() out of spinlock

Move the kzalloc() calls in nx842_probe() and nx842_OF_upd() to the top
of the functions, before taking the devdata spinlock.

Since kzalloc() without GFP_ATOMIC can sleep, it can't be called while
holding a spinlock.  Move the calls to before taking the lock.

Signed-off-by: Dan Streetman <ddstreet@ieee.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/nx/nx-842-pseries.c