Re: [PATCH] crypto: document correct return value for request allocation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux