]> git.karo-electronics.de Git - linux-beck.git/commitdiff
crypto: doc - document correct return value for request allocation
authorEric Biggers <ebiggers3@gmail.com>
Sat, 2 Apr 2016 15:54:56 +0000 (10:54 -0500)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 15 Apr 2016 14:35:44 +0000 (22:35 +0800)
Signed-off-by: Eric Biggers <ebiggers3@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Documentation/DocBook/crypto-API.tmpl
include/crypto/aead.h
include/crypto/hash.h
include/crypto/skcipher.h
include/linux/crypto.h

index 348619fcafb817e87876fd7a874b27d617900acf..d55dc5a39bad9abe20e4ca5060d7a1cd479ea3ee 100644 (file)
@@ -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;
        }
 
index 957bb87632197f25a162440c9eb9b8c673ec7239..75174f80a1063d67ef4db86ec2d22634ed2da583 100644 (file)
@@ -405,8 +405,7 @@ static inline void aead_request_set_tfm(struct aead_request *req,
  * encrypt and decrypt API calls. During the allocation, the provided aead
  * handle is registered in the request data structure.
  *
- * Return: allocated request handle in case of success; IS_ERR() is true in case
- *        of an error, PTR_ERR() returns the error code.
+ * Return: allocated request handle in case of success, or NULL if out of memory
  */
 static inline struct aead_request *aead_request_alloc(struct crypto_aead *tfm,
                                                      gfp_t gfp)
index 1969f1416658babc28dd6d2a75363b93da36ac63..26605888a199ed0446d27268844ea5bff09b8aaa 100644 (file)
@@ -547,8 +547,7 @@ static inline void ahash_request_set_tfm(struct ahash_request *req,
  * the allocation, the provided ahash handle
  * is registered in the request data structure.
  *
- * Return: allocated request handle in case of success; IS_ERR() is true in case
- *        of an error, PTR_ERR() returns the error code.
+ * Return: allocated request handle in case of success, or NULL if out of memory
  */
 static inline struct ahash_request *ahash_request_alloc(
        struct crypto_ahash *tfm, gfp_t gfp)
index 905490c1da89b30ab1cf05b7a4aeaf1962e4e6ce..0f987f50bb52c67a9a731ef549fa317e3fe52cbd 100644 (file)
@@ -425,8 +425,7 @@ static inline struct skcipher_request *skcipher_request_cast(
  * encrypt and decrypt API calls. During the allocation, the provided skcipher
  * handle is registered in the request data structure.
  *
- * Return: allocated request handle in case of success; IS_ERR() is true in case
- *        of an error, PTR_ERR() returns the error code.
+ * Return: allocated request handle in case of success, or NULL if out of memory
  */
 static inline struct skcipher_request *skcipher_request_alloc(
        struct crypto_skcipher *tfm, gfp_t gfp)
index 99c94899ad0fef73d8c7854c247e5cd109ebe241..6e28c895c37691879400957e997f9cb0b916fbda 100644 (file)
@@ -948,8 +948,7 @@ static inline struct ablkcipher_request *ablkcipher_request_cast(
  * encrypt and decrypt API calls. During the allocation, the provided ablkcipher
  * handle is registered in the request data structure.
  *
- * Return: allocated request handle in case of success; IS_ERR() is true in case
- *        of an error, PTR_ERR() returns the error code.
+ * Return: allocated request handle in case of success, or NULL if out of memory
  */
 static inline struct ablkcipher_request *ablkcipher_request_alloc(
        struct crypto_ablkcipher *tfm, gfp_t gfp)