Re: [PATCH][next] nfsd: remove redundant assignment to pointer dentry

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

 




> On Feb 14, 2023, at 9:55 AM, Dan Carpenter <error27@xxxxxxxxx> wrote:
> 
> On Tue, Feb 14, 2023 at 02:14:28PM +0000, Colin Ian King wrote:
>> The pointer dentry is assigned a value that is never read, the
>> assignment is redundant and can be removed.
>> 
>> Cleans up clang-scan warning:
>> fs/nfsd/nfsctl.c:1231:2: warning: Value stored to 'dentry' is
>> never read [deadcode.DeadStores]
>>        dentry = ERR_PTR(ret);
>> 
>> Signed-off-by: Colin Ian King <colin.i.king@xxxxxxxxx>
> 
> No need to initalized "int ret = -ENOMEM;" either.

Thanks for the report.

Both came in when I copied nfsd_mkdir. I'll clean them up.


--
Chuck Lever







[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux