From a587c5ee0a45dea9ed6fc3d695259da8dc7a5bb3 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Sat, 28 Oct 2023 22:16:59 -0700 Subject: crypto: shash - don't exclude async statuses from error stats EINPROGRESS and EBUSY have special meaning for async operations. However, shash is always synchronous, so these statuses have no special meaning for shash and don't need to be excluded when handling errors. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu --- crypto/shash.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'crypto/shash.c') diff --git a/crypto/shash.c b/crypto/shash.c index d5194221..c3f7f6a2 100644 --- a/crypto/shash.c +++ b/crypto/shash.c @@ -23,12 +23,8 @@ static inline struct crypto_istat_hash *shash_get_stat(struct shash_alg *alg) static inline int crypto_shash_errstat(struct shash_alg *alg, int err) { - if (!IS_ENABLED(CONFIG_CRYPTO_STATS)) - return err; - - if (err && err != -EINPROGRESS && err != -EBUSY) + if (IS_ENABLED(CONFIG_CRYPTO_STATS) && err) atomic64_inc(&shash_get_stat(alg)->err_cnt); - return err; } -- cgit v1.2.3