Re: [PATCH] crypto: document correct return value for request allocation
From: LABBE Corentin
Date: Mon Apr 04 2016 - 03:27:31 EST
On Sat, Apr 02, 2016 at 10:54:56AM -0500, Eric Biggers wrote:
> Signed-off-by: Eric Biggers <ebiggers3@xxxxxxxxx>
> ---
> Documentation/DocBook/crypto-API.tmpl | 6 +++---
> include/crypto/aead.h | 3 +--
> include/crypto/hash.h | 3 +--
> include/crypto/skcipher.h | 3 +--
> include/linux/crypto.h | 3 +--
> 5 files changed, 7 insertions(+), 11 deletions(-)
>
> diff --git a/Documentation/DocBook/crypto-API.tmpl b/Documentation/DocBook/crypto-API.tmpl
> index 348619f..d55dc5a 100644
> --- a/Documentation/DocBook/crypto-API.tmpl
> +++ b/Documentation/DocBook/crypto-API.tmpl
> @@ -1936,9 +1936,9 @@ static int test_skcipher(void)
> }
>
> req = skcipher_request_alloc(skcipher, GFP_KERNEL);
> - if (IS_ERR(req)) {
> - pr_info("could not allocate request queue\n");
> - ret = PTR_ERR(req);
> + if (!req) {
> + pr_info("could not allocate skcipher request\n");
> + ret = -ENOMEM;
> goto out;
> }
Hello
I think pr_err is better than pr_info.
Regards