]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: cavium/nitrox - Fix 'nitrox_get_first_device()' when ndevlist is fully iterated
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 30 May 2020 13:35:37 +0000 (15:35 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 4 Jun 2020 12:06:26 +0000 (22:06 +1000)
commit6e7f40e00c912448d43621e59185504901a4a373
tree78265c0256375d85d13e83fe2919434d103d617e
parent748c4aa9bbff0ec4df60626c066bdc4df8fd3b93
crypto: cavium/nitrox - Fix 'nitrox_get_first_device()' when ndevlist is fully iterated

When a list is completely iterated with 'list_for_each_entry(x, ...)', x is
not NULL at the end.

While at it, remove a useless initialization of the ndev variable. It
is overridden by 'list_for_each_entry'.

Fixes: 566e59fe4824 ("crypto: cavium - Register the CNN55XX supported crypto algorithms.")
Cc: <stable@vger.kernel.org>
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/cavium/nitrox/nitrox_main.c