diff options
author | Luis Henriques <lhenriques@suse.de> | 2023-09-29 12:12:06 +0300 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2023-10-09 14:35:24 +0300 |
commit | 42b71826fe5d01f3e6cdddc91f81d0e4afb91801 (patch) | |
tree | 4a05605ad2394c6cf388760960dafade2ef69316 /fs/jbd2/commit.c | |
parent | 15c0a870dc44ed14e01efbdd319d232234ee639f (diff) | |
download | linux-42b71826fe5d01f3e6cdddc91f81d0e4afb91801.tar.xz |
ceph: remove unnecessary IS_ERR() check in ceph_fname_to_usr()
Before returning, function ceph_fname_to_usr() does a final IS_ERR() check
in 'dir':
if ((dir != fname->dir) && !IS_ERR(dir)) {...}
This check is unnecessary because, if the 'dir' variable has changed to
something other than 'fname->dir' (it's initial value), that error check has
been performed already and, if there was indeed an error, it would have
been returned immediately.
Besides, this useless IS_ERR() is also confusing static analysis tools.
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202309282202.xZxGdvS3-lkp@intel.com/
Signed-off-by: Luis Henriques <lhenriques@suse.de>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/jbd2/commit.c')
0 files changed, 0 insertions, 0 deletions