From 050d2a8b6992fd012773e75de9f82d45e3b3dfff Mon Sep 17 00:00:00 2001 From: Chen Zhou Date: Wed, 22 Jan 2020 18:20:30 +0800 Subject: [PATCH] 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 Signed-off-by: Steve French Reviewed-by: Paulo Alcantara (SUSE) --- fs/cifs/dfs_cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) { -- GitLab