OSDN Git Service

staging: erofs: use the wrapped PTR_ERR_OR_ZERO instead of open code
authorGao Xiang <gaoxiang25@huawei.com>
Mon, 30 Jul 2018 01:51:01 +0000 (09:51 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 30 Jul 2018 07:38:34 +0000 (09:38 +0200)
Just clean up and logic doesn't change.

Link: https://lists.01.org/pipermail/kbuild-all/2018-July/050766.html
Fixes: d72d1ce60174 ("staging: erofs: add namei functions")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/erofs/namei.c

index d2a0da3..546a471 100644 (file)
@@ -195,7 +195,7 @@ int erofs_namei(struct inode *dir,
        kunmap_atomic(data);
        put_page(page);
 
-       return IS_ERR(de) ? PTR_ERR(de) : 0;
+       return PTR_ERR_OR_ZERO(de);
 }
 
 /* NOTE: i_mutex is already held by vfs */