crypto: mediatek - Fix wrong return value in mtk_desc_ring_alloc()
authorTianjia Zhang <tianjia.zhang@linux.alibaba.com>
Sun, 2 Aug 2020 11:15:32 +0000 (19:15 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 08:07:01 +0000 (09:07 +0100)
commitbf65f0c0cafb40c41ca37bdaab6e3b36ecbbd934
tree49b5750a0a5d44be7957cf99a30856d87636f07c
parent9751cc18971d1c3e1103a823b5324cb8312058a4
crypto: mediatek - Fix wrong return value in mtk_desc_ring_alloc()

[ Upstream commit 8cbde6c6a6d2b1599ff90f932304aab7e32fce89 ]

In case of memory allocation failure, a negative error code should
be returned.

Fixes: 785e5c616c849 ("crypto: mediatek - Add crypto driver support for some MediaTek chips")
Cc: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/mediatek/mtk-platform.c