linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] udf: Remove redundant initialization of variable ret
@ 2020-09-22  8:13 Jing Xiangfeng
  2020-09-22  9:22 ` Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: Jing Xiangfeng @ 2020-09-22  8:13 UTC (permalink / raw)
  To: jack; +Cc: linux-kernel, jingxiangfeng

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.

Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
---
 fs/udf/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/udf/super.c b/fs/udf/super.c
index 1c42f544096d..c0c8068116c1 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -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);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] udf: Remove redundant initialization of variable ret
  2020-09-22  8:13 [PATCH] udf: Remove redundant initialization of variable ret Jing Xiangfeng
@ 2020-09-22  9:22 ` Jan Kara
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2020-09-22  9:22 UTC (permalink / raw)
  To: Jing Xiangfeng; +Cc: jack, linux-kernel

On Tue 22-09-20 16:13:22, Jing Xiangfeng wrote:
> 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.
> 
> Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>

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

								Honza

> ---
>  fs/udf/super.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/udf/super.c b/fs/udf/super.c
> index 1c42f544096d..c0c8068116c1 100644
> --- a/fs/udf/super.c
> +++ b/fs/udf/super.c
> @@ -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);
> -- 
> 2.17.1
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-22  9:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-22  8:13 [PATCH] udf: Remove redundant initialization of variable ret Jing Xiangfeng
2020-09-22  9:22 ` Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).