mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ovl: fix ptr_ret.cocci warnings
       [not found] <201802060014.IgBGjPbI%fengguang.wu@intel.com>
@ 2018-02-05 16:25 ` kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2018-02-05 16:25 UTC (permalink / raw)
  To: Amir Goldstein; +Cc: kbuild-all, linux-unionfs, Miklos Szeredi, linux-kernel

From: Fengguang Wu <fengguang.wu@intel.com>

fs/overlayfs/export.c:459:10-16: WARNING: PTR_ERR_OR_ZERO can be used


 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: 4b91c30a5a19 ("ovl: lookup connected ancestor of dir in inode cache")
CC: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 export.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/overlayfs/export.c
+++ b/fs/overlayfs/export.c
@@ -456,7 +456,7 @@ static struct dentry *ovl_lookup_real(st
 			if (err == -ECHILD) {
 				this = ovl_lookup_real_ancestor(sb, real,
 								layer);
-				err = IS_ERR(this) ? PTR_ERR(this) : 0;
+				err = PTR_ERR_OR_ZERO(this);
 			}
 			if (!err) {
 				dput(connected);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-02-05 16:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <201802060014.IgBGjPbI%fengguang.wu@intel.com>
2018-02-05 16:25 ` [PATCH] ovl: fix ptr_ret.cocci warnings kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®