Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

crypto: ux500/hash - simplify if-if to if-else

Replace `if (!req_ctx->updated)` with `else` for simplification
and add curly brackets according to the kernel coding style:

"Do not unnecessarily use braces where a single statement will do."

...

"This does not apply if only one branch of a conditional statement is
a single statement; in the latter case use braces in both branches"

Please refer to:
https://www.kernel.org/doc/html/v5.17-rc8/process/coding-style.html

Signed-off-by: Yihao Han <hanyihao@vivo.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Yihao Han and committed by
Herbert Xu
10299073 716a757c

+1 -3
+1 -3
drivers/crypto/ux500/hash/hash_core.c
··· 877 877 __func__); 878 878 goto out; 879 879 } 880 - } 881 - 882 - if (!req_ctx->updated) { 880 + } else { 883 881 ret = hash_setconfiguration(device_data, &ctx->config); 884 882 if (ret) { 885 883 dev_err(device_data->dev,