]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: scompress - return proper error code for allocation failure
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Fri, 29 Mar 2019 13:09:55 +0000 (14:09 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 8 Apr 2019 06:36:16 +0000 (14:36 +0800)
commit823295a0ba9993f94430c995c0149f1c8df28b8d
tree07869c8b028f77343aa984312331f8ae65915b5c
parent7d79c4402d1d91d9d71c52fc77109b29420335dc
crypto: scompress - return proper error code for allocation failure

If scomp_acomp_comp_decomp() fails to allocate memory for the
destination then we never copy back the data we compressed.
It is probably best to return an error code instead 0 in case of
failure.
I haven't found any user that is using acomp_request_set_params()
without the `dst' buffer so there is probably no harm.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/scompress.c