Re: [PATCH] ocfs2: remove redundant initialization of variable ret

From: Joseph Qi
Date: Mon Jun 14 2021 - 22:52:25 EST




On 6/13/21 9:51 PM, Colin King wrote:
> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
>
> The variable ret is being initialized with a value that is never read, the
> assignment is redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>

Acked-by: Joseph Qi <joseph.qi@xxxxxxxxxxxxxxxxx>
> ---
> fs/ocfs2/cluster/nodemanager.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ocfs2/cluster/nodemanager.c b/fs/ocfs2/cluster/nodemanager.c
> index bb82e6b1ff4e..625c92521416 100644
> --- a/fs/ocfs2/cluster/nodemanager.c
> +++ b/fs/ocfs2/cluster/nodemanager.c
> @@ -824,7 +824,7 @@ static void __exit exit_o2nm(void)
>
> static int __init init_o2nm(void)
> {
> - int ret = -1;
> + int ret;
>
> o2hb_init();
>
>