Skip to content

Commit

Permalink
cifs: use PTR_ERR_OR_ZERO() to simplify code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chen Zhou authored and Steve French committed Jan 27, 2020
1 parent 8bd0d70 commit 050d2a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/cifs/dfs_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 050d2a8

Please sign in to comment.