mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mukesh Ojha <mojha@codeaurora.org>
To: Yue Haibing <yuehaibing@huawei.com>,
	herbert@gondor.apana.org.au, davem@davemloft.net,
	shawnguo@kernel.org, s.hauer@pengutronix.de,
	kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com
Cc: linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH -next] crypto: mxs-dcp - return errcode in mxs_dcp_aes_enqueue and dcp_sha_update_fx
Date: Sat, 30 Mar 2019 15:37:41 +0530	[thread overview]
Message-ID: <b577d656-60d8-b00e-4ac0-24d0d318ee83@codeaurora.org> (raw)
In-Reply-To: <20190330055221.24748-1-yuehaibing@huawei.com>


On 3/30/2019 11:22 AM, Yue Haibing wrote:
> From: YueHaibing <yuehaibing@huawei.com>
>
> 'err' is set in err path, but it's not returned to callers.
> Don't always return -EINPROGRESS, return err.


how this one sounds ?

'err' is set in error path inside crypto_enqueue_request(), but this is not getting
returned upstream but, always EINPROGRESS. Fix this by returning appropriate error value.


>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>

Cheers,
-Mukesh


> ---
>   drivers/crypto/mxs-dcp.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/crypto/mxs-dcp.c b/drivers/crypto/mxs-dcp.c
> index a2105cf..494cfc4 100644
> --- a/drivers/crypto/mxs-dcp.c
> +++ b/drivers/crypto/mxs-dcp.c
> @@ -471,7 +471,7 @@ static int mxs_dcp_aes_enqueue(struct ablkcipher_request *req, int enc, int ecb)
>   
>   	wake_up_process(sdcp->thread[actx->chan]);
>   
> -	return -EINPROGRESS;
> +	return ret;
>   }
>   
>   static int mxs_dcp_aes_ecb_decrypt(struct ablkcipher_request *req)
> @@ -797,7 +797,7 @@ static int dcp_sha_update_fx(struct ahash_request *req, int fini)
>   	wake_up_process(sdcp->thread[actx->chan]);
>   	mutex_unlock(&actx->mutex);
>   
> -	return -EINPROGRESS;
> +	return ret;
>   }
>   
>   static int dcp_sha_update(struct ahash_request *req)

  reply	other threads:[~2019-03-30 10:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-30  5:52 Yue Haibing
2019-03-30 10:07 ` Mukesh Ojha [this message]
2019-04-08  6:41 ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b577d656-60d8-b00e-4ac0-24d0d318ee83@codeaurora.org \
    --to=mojha@codeaurora.org \
    --cc=davem@davemloft.net \
    --cc=festevam@gmail.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=yuehaibing@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®