crypto: caam/qi - fix error path in xts setkey
authorHoria Geantă <horia.geanta@nxp.com>
Mon, 6 Aug 2018 12:29:39 +0000 (15:29 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 9 Sep 2018 17:56:02 +0000 (19:56 +0200)
commit0682e027f39dfcdef5f5d9c264491a34196f3b25
tree5af33b3440f27bd6a91311a9561e7ffed1b981ad
parentccb38942fbe180a70b773bc1dbe47d48d9458bf3
crypto: caam/qi - fix error path in xts setkey

commit ad876a18048f43b1f66f5d474b7598538668c5de upstream.

xts setkey callback returns 0 on some error paths.
Fix this by returning -EINVAL.

Cc: <stable@vger.kernel.org> # 4.12+
Fixes: b189817cf789 ("crypto: caam/qi - add ablkcipher and authenc algorithms")
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/crypto/caam/caamalg_qi.c