[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20180123201439.13269-1-chrisadr@gentoo.org>
Date: Tue, 23 Jan 2018 15:14:39 -0500
From: Christopher Díaz Riveros <chrisadr@...too.org>
To: sudeep.dutt@...el.com, ashutosh.dixit@...el.com, arnd@...db.de,
gregkh@...uxfoundation.org, viro@...iv.linux.org.uk
Cc: linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
Christopher Díaz Riveros <chrisadr@...too.org>
Subject: [PATCH-next] misc: mic: Use PTR_ERR_OR_ZERO
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
This issue was detected by using the Coccinelle software.
Signed-off-by: Christopher Díaz Riveros <chrisadr@...too.org>
---
drivers/misc/mic/scif/scif_epd.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/misc/mic/scif/scif_epd.h b/drivers/misc/mic/scif/scif_epd.h
index f39b663da287..b2a835665390 100644
--- a/drivers/misc/mic/scif/scif_epd.h
+++ b/drivers/misc/mic/scif/scif_epd.h
@@ -165,9 +165,7 @@ static inline int scif_verify_epd(struct scif_endpt *ep)
static inline int scif_anon_inode_getfile(scif_epd_t epd)
{
epd->anon = anon_inode_getfile("scif", &scif_anon_fops, NULL, 0);
- if (IS_ERR(epd->anon))
- return PTR_ERR(epd->anon);
- return 0;
+ return PTR_ERR_OR_ZERO(epd->anon);
}
static inline void scif_anon_inode_fput(scif_epd_t epd)
--
2.16.0
Powered by blists - more mailing lists