summaryrefslogtreecommitdiff
path: root/fs/cifs
diff options
context:
space:
mode:
authorChen Zhou <chenzhou10@huawei.com>2020-01-22 18:20:30 +0800
committerSteve French <stfrench@microsoft.com>2020-01-26 19:24:17 -0600
commit050d2a8b6992fd012773e75de9f82d45e3b3dfff (patch)
tree141056695d16acf788ba7c9ffc4f018b96a8975f /fs/cifs
parent8bd0d701445ef263a52968ced2854c3d35712695 (diff)
cifs: use PTR_ERR_OR_ZERO() to simplify code
PTR_ERR_OR_ZERO contains if(IS_ERR(...)) + PTR_ERR, just use PTR_ERR_OR_ZERO directly. Signed-off-by: Chen Zhou <chenzhou10@huawei.com> Signed-off-by: Steve French <stfrench@microsoft.com> Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/dfs_cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/dfs_cache.c b/fs/cifs/dfs_cache.c
index b0315b7270b4..9a384d1e27b4 100644
--- a/fs/cifs/dfs_cache.c
+++ b/fs/cifs/dfs_cache.c
@@ -661,7 +661,7 @@ static int __dfs_cache_find(const unsigned int xid, struct cifs_ses *ses,
*/
if (noreq) {
up_read(&htable_rw_lock);
- return IS_ERR(ce) ? PTR_ERR(ce) : 0;
+ return PTR_ERR_OR_ZERO(ce);
}
if (!IS_ERR(ce)) {