From: Vasyl Gomonovych <gomonovych@gmail.com>
To: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org,
dri-devel@lists.freedesktop.org
Cc: Vasyl Gomonovych <gomonovych@gmail.com>,
Tomi Valkeinen <tomi.valkeinen@ti.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Mark Brown <broonie@kernel.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH] video: fbdev: omap2: Use PTR_ERR_OR_ZERO()
Date: Wed, 29 Nov 2017 16:22:48 +0000 [thread overview]
Message-ID: <1511972570-30240-1-git-send-email-gomonovych@gmail.com> (raw)
Fix ptr_ret.cocci warnings:
drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c:676:1-3: 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
Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com>
---
drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c b/drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c
index ec78d61bc551..28de56e21c74 100644
--- a/drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c
+++ b/drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c
@@ -673,10 +673,7 @@ static int hdmi_audio_register(struct device *dev)
dev, "omap-hdmi-audio", PLATFORM_DEVID_AUTO,
&pdata, sizeof(pdata));
- if (IS_ERR(hdmi.audio_pdev))
- return PTR_ERR(hdmi.audio_pdev);
-
- return 0;
+ return PTR_ERR_OR_ZERO(hdmi.audio_pdev);
}
/* HDMI HW IP initialisation */
--
1.9.1
next reply other threads:[~2017-11-29 16:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20171129162304epcas5p4874d26ebbc84f3e2a9804548b6deb762@epcas5p4.samsung.com>
2017-11-29 16:22 ` Vasyl Gomonovych [this message]
2018-01-04 13:58 ` [PATCH] video: fbdev: omap2: Use PTR_ERR_OR_ZERO() Bartlomiej Zolnierkiewicz
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=1511972570-30240-1-git-send-email-gomonovych@gmail.com \
--to=gomonovych@gmail.com \
--cc=b.zolnierkie@samsung.com \
--cc=broonie@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=tomi.valkeinen@ti.com \
/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;
as well as URLs for NNTP newsgroup(s).