Commit 10299073 authored by Yihao Han's avatar Yihao Han Committed by Herbert Xu
Browse files

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: default avatarYihao Han <hanyihao@vivo.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 716a757c
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -877,9 +877,7 @@ static int hash_dma_final(struct ahash_request *req)
				__func__);
			goto out;
		}
	}

	if (!req_ctx->updated) {
	} else {
		ret = hash_setconfiguration(device_data, &ctx->config);
		if (ret) {
			dev_err(device_data->dev,