crypto: hisilicon/hpre - Fix a erroneous check after snprintf()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Mon, 4 Sep 2023 20:17:29 +0000 (22:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Nov 2023 10:59:18 +0000 (11:59 +0100)
commit00dcb2738b07e9b29a298f4138f5ddb482da343c
tree0c741f19531237febea6af36ef2a69c14dd0a26c
parent0c78ae22c68c376709533dbadb7ef74ad924f72a
crypto: hisilicon/hpre - Fix a erroneous check after snprintf()

[ Upstream commit c977950146720abff14e46d8c53f5638b06a9182 ]

This error handling looks really strange.
Check if the string has been truncated instead.

Fixes: 02ab994635eb ("crypto: hisilicon - Fixed some tiny bugs of HPRE")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/hisilicon/hpre/hpre_main.c