Skip to content

Commit 050d2a8

Browse files
Chen Zhousmfrench
authored andcommitted
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 <[email protected]> Signed-off-by: Steve French <[email protected]> Reviewed-by: Paulo Alcantara (SUSE) <[email protected]>
1 parent 8bd0d70 commit 050d2a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/cifs/dfs_cache.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ static int __dfs_cache_find(const unsigned int xid, struct cifs_ses *ses,
661661
*/
662662
if (noreq) {
663663
up_read(&htable_rw_lock);
664-
return IS_ERR(ce) ? PTR_ERR(ce) : 0;
664+
return PTR_ERR_OR_ZERO(ce);
665665
}
666666

667667
if (!IS_ERR(ce)) {

0 commit comments

Comments
 (0)