afs: Remove redundant assignment to ret
Variable ret is set to -ENOENT and -ENOMEM but this value is never
read as it is overwritten or not used later on, hence it is a
redundant assignment and can be removed.
Cleans up the following clang-analyzer warning:
fs/afs/dir.c:2014:4: warning: Value stored to 'ret' is never read
fs/afs/dir.c:659:2: warning: Value stored to 'ret' is never read
[DH made the following modifications:
- In afs_rename(), -ENOMEM should be placed in op->error instead of ret,
rather than the assignment being removed entirely. afs_put_operation()
will pick it up from there and return it.
- If afs_sillyrename() fails, its error code should be placed in op->error
rather than in ret also.
Fixes: e49c7b2f6de7 ("afs: Build an abstraction around an "operation" concept")
Reported-by: Abaci Robot <firstname.lastname@example.org>
Signed-off-by: Jiapeng Chong <email@example.com>
Signed-off-by: David Howells <firstname.lastname@example.org>
Reviewed-by: Marc Dionne <email@example.com>
Link: https://firstname.lastname@example.org/ # v1
Link: https://email@example.com/ # v2
1 file changed