From: "Christopher Díaz Riveros" <chrisadr@gentoo.org>
To: sudeep.dutt@intel.com, ashutosh.dixit@intel.com, arnd@arndb.de,
gregkh@linuxfoundation.org, viro@zeniv.linux.org.uk
Cc: "Christopher Díaz Riveros" <chrisadr@gentoo.org>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH-next] misc: mic: Use PTR_ERR_OR_ZERO
Date: Tue, 23 Jan 2018 15:10:09 -0500 [thread overview]
Message-ID: <20180123201009.12998-1-chrisadr@gentoo.org> (raw)
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@gentoo.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
next reply other threads:[~2018-01-23 20:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-23 20:10 Christopher Díaz Riveros [this message]
2018-01-23 21:55 ` Al Viro
2018-01-27 3:45 ` Ashutosh Dixit
2018-01-24 8:16 ` walter harms
2018-01-23 20:14 Christopher Díaz Riveros
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180123201009.12998-1-chrisadr@gentoo.org \
--to=chrisadr@gentoo.org \
--cc=arnd@arndb.de \
--cc=ashutosh.dixit@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sudeep.dutt@intel.com \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®