crypto: talitos - reorder code in talitos_edesc_alloc()
authorChristophe Leroy <christophe.leroy@c-s.fr>
Tue, 8 Jan 2019 06:56:46 +0000 (06:56 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Jan 2019 07:09:48 +0000 (08:09 +0100)
commitc3f5e4efce3e2ece7f31826a14849e60d342bde1
tree5069eaf7708626cd32792f8bce88d612638cfd29
parent24c99a924db92c46cb317856e7e84c61ff02c8cb
crypto: talitos - reorder code in talitos_edesc_alloc()

commit c56c2e173773097a248fd3bace91ac8f6fc5386d upstream.

This patch moves the mapping of IV after the kmalloc(). This
avoids having to unmap in case kmalloc() fails.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Cc: stable@vger.kernel.org
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/crypto/talitos.c