Skip to contentSkip to conversation

udf: Remove redundant initialization of variable ret

PATCH In review Jing Xiangfeng 2 participants 2 messages Sep 22, 2020 UDF filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 udf: Remove redundant initialization of variable ret

After commit 9293fcfbc181 ("udf: Remove struct ustr as non-needed intermediate storage"), the variable ret is being initialized with '-ENOMEM' that is meaningless. So remove it.

---
 fs/udf/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/udf/super.c +1 -1
index 1c42f544096d..c0c8068116c1 100644
@@ -854,7 +854,7 @@ static int udf_load_pvoldesc(struct super_block *sb, sector_t block)
 	uint8_t *outstr;
 	struct buffer_head *bh;
 	uint16_t ident;
-	int ret = -ENOMEM;
+	int ret;
 	struct timestamp *ts;
 
 	outstr = kmalloc(128, GFP_NOFS);
Signature · 1 line
2.17.1
#1 lore raw
Quoted 5 lines · Jing Xiangfeng

After commit 9293fcfbc181 ("udf: Remove struct ustr as non-needed intermediate storage"), the variable ret is being initialized with '-ENOMEM' that is meaningless. So remove it.

Thanks. I've queued the patch to my tree.

Honza

Quoted 20 lines
---
 fs/udf/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/udf/super.c +1 -1
index 1c42f544096d..c0c8068116c1 100644
@@ -854,7 +854,7 @@ static int udf_load_pvoldesc(struct super_block *sb, sector_t block)
 	uint8_t *outstr;
 	struct buffer_head *bh;
 	uint16_t ident;
-	int ret = -ENOMEM;
+	int ret;
 	struct timestamp *ts;
 
 	outstr = kmalloc(128, GFP_NOFS);
Signature · 1 line
2.17.1
Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR