]> git.itanic.dy.fi Git - linux-stable/commit
crypto: sun8i-ss - Fix a test in sun8i_ss_setup_ivs()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Mon, 17 Apr 2023 20:25:09 +0000 (22:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 May 2023 09:50:20 +0000 (11:50 +0200)
commit7b36a06bacf7f3aa6859ce87caaabdda39a56f0d
treec1c5e284c48a91ecb5e4752f4c6481ac5defbc12
parentb6e2d1e253a4134eb2985453ccae78c1115e67db
crypto: sun8i-ss - Fix a test in sun8i_ss_setup_ivs()

[ Upstream commit 8fd91151ebcb21b3f2f2bf158ac6092192550b2b ]

SS_ENCRYPTION is (0 << 7 = 0), so the test can never be true.
Use a direct comparison to SS_ENCRYPTION instead.

The same king of test is already done the same way in sun8i_ss_run_task().

Fixes: 359e893e8af4 ("crypto: sun8i-ss - rework handling of IV")
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/allwinner/sun8i-ss/sun8i-ss-cipher.c