Re: [PATCH 1/2] fs/ntfs3: Remove a useless test in 'indx_find()'

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

 



On Sat, Sep 18, 2021 at 09:56:19PM +0200, Christophe JAILLET wrote:
> 'fnd' has been dereferenced several time before, so testing it here is
> pointless.
> Moreover, all callers of 'indx_find()' already have some error handling
> code that makes sure that no NULL 'fnd' is passed.
> 
> So, remove the useless test.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>

Seems correct, thanks.

Reviewed-by: Kari Argillander <kari.argillander@xxxxxxxxx>

> ---
>  fs/ntfs3/index.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/fs/ntfs3/index.c b/fs/ntfs3/index.c
> index 4f71a91f07d9..6f81e3a49abf 100644
> --- a/fs/ntfs3/index.c
> +++ b/fs/ntfs3/index.c
> @@ -1072,9 +1072,7 @@ int indx_find(struct ntfs_index *indx, struct ntfs_inode *ni,
>  	if (!e)
>  		return -EINVAL;
>  
> -	if (fnd)
> -		fnd->root_de = e;
> -
> +	fnd->root_de = e;
>  	err = 0;
>  
>  	for (;;) {
> -- 
> 2.30.2
> 



[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