Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb167963 authored by Wei Yongjun's avatar Wei Yongjun Committed by Herbert Xu
Browse files

crypto: ux500 - fix error return code in hash_dma_final()



Fix to return a negative error code from the error handling
case instead of 0, as returned elsewhere in this function.

Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 5cec26e9
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -939,6 +939,7 @@ static int hash_dma_final(struct ahash_request *req)
	if (!ctx->device->dma.nents) {
		dev_err(device_data->dev, "[%s] "
				"ctx->device->dma.nents = 0", __func__);
		ret = ctx->device->dma.nents;
		goto out;
	}

@@ -946,6 +947,7 @@ static int hash_dma_final(struct ahash_request *req)
	if (bytes_written != req->nbytes) {
		dev_err(device_data->dev, "[%s] "
				"hash_dma_write() failed!", __func__);
		ret = bytes_written;
		goto out;
	}