diff options
author | Mark Brown <broonie@kernel.org> | 2016-02-09 21:20:39 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-02-09 21:20:39 +0300 |
commit | fcdcc79628a1919bde9acf239e364f65bab6327c (patch) | |
tree | 5499be387cf3028c90ac083b1cf866ebed7bf7e0 /crypto/algapi.c | |
parent | 7a8d44bc89e5cddcd5c0704a11a90484d36ba6ba (diff) | |
parent | a0a90718f18264dc904d34a580f332006f5561e9 (diff) | |
download | linux-fcdcc79628a1919bde9acf239e364f65bab6327c.tar.xz |
Merge branch 'topic/acpi' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi into spi-pxa2xx
Diffstat (limited to 'crypto/algapi.c')
-rw-r--r-- | crypto/algapi.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/crypto/algapi.c b/crypto/algapi.c index 59bf491fe3d8..7be76aa31579 100644 --- a/crypto/algapi.c +++ b/crypto/algapi.c @@ -93,16 +93,15 @@ static struct list_head *crypto_more_spawns(struct crypto_alg *alg, { struct crypto_spawn *spawn, *n; - if (list_empty(stack)) + spawn = list_first_entry_or_null(stack, struct crypto_spawn, list); + if (!spawn) return NULL; - spawn = list_first_entry(stack, struct crypto_spawn, list); - n = list_entry(spawn->list.next, struct crypto_spawn, list); + n = list_next_entry(spawn, list); if (spawn->alg && &n->list != stack && !n->alg) n->alg = (n->list.next == stack) ? alg : - &list_entry(n->list.next, struct crypto_spawn, - list)->inst->alg; + &list_next_entry(n, list)->inst->alg; list_move(&spawn->list, secondary_spawns); |