crypto: ccree - remove special handling of chained sg
authorGilad Ben-Yossef <gilad@benyossef.com>
Thu, 18 Apr 2019 13:38:48 +0000 (16:38 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 May 2019 05:37:39 +0000 (07:37 +0200)
commit642de1c00a14f875a20c8fb832bae820f02089d0
tree9cb31c47e9a6722b84c419c334cf453fa9ca914c
parent1bfceb375034f7f3222c49e3fbe5bfe820bdcba0
crypto: ccree - remove special handling of chained sg

commit c4b22bf51b815fb61a35a27fc847a88bc28ebb63 upstream.

We were handling chained scattergather lists with specialized code
needlessly as the regular sg APIs handle them just fine. The code
handling this also had an (unused) code path with a use-before-init
error, flagged by Coverity.

Remove all special handling of chained sg and leave their handling
to the regular sg APIs.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Cc: stable@vger.kernel.org # v4.19+
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/crypto/ccree/cc_buffer_mgr.c