[patch] ext4 crypto: fix an error code in ext4_init_crypto()

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

 



The callers don't care about the error so it doesn't make a difference,
but static checkers complain so let's return an error code here.

Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

diff --git a/fs/ext4/crypto.c b/fs/ext4/crypto.c
index 226e07f..6110ccd 100644
--- a/fs/ext4/crypto.c
+++ b/fs/ext4/crypto.c
@@ -233,7 +233,7 @@ void ext4_exit_crypto(void)
  */
 int ext4_init_crypto(void)
 {
-	int i, res = 0;
+	int i, res;
 
 	mutex_lock(&crypto_init);
 	if (ext4_read_workqueue)
@@ -257,8 +257,10 @@ int ext4_init_crypto(void)
 
 	ext4_bounce_page_pool =
 		mempool_create_page_pool(num_prealloc_crypto_pages, 0);
-	if (!ext4_bounce_page_pool)
+	if (!ext4_bounce_page_pool) {
+		res = -ENOMEM;
 		goto fail;
+	}
 already_initialized:
 	mutex_unlock(&crypto_init);
 	return 0;
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux