From: "ethan.zhao" <ethan.kernel@gmail.com>
To: laurent.pinchart@ideasonboard.com
Cc: linux-kernel@vger.kernel.org, "ethan.zhao" <ethan.kernel@gmail.com>
Subject: [PATCH] r_du_lvdsenc.c : Check return value of devm_ioremap_resource with IS_ERR
Date: Sun, 8 Dec 2013 10:41:46 +0800 [thread overview]
Message-ID: <1386470506-553-1-git-send-email-ethan.kernel@gmail.com> (raw)
function devm_ioremap_resource() doesn't return NULL, should check its return
value with helper IS_ERR().
Signed-off-by: ethan.zhao <ethan.kernel@gmail.com>
---
drivers/gpu/drm/rcar-du/rcar_du_lvdsenc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_lvdsenc.c b/drivers/gpu/drm/rcar-du/rcar_du_lvdsenc.c
index a0f6a17..93190ab 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_lvdsenc.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_lvdsenc.c
@@ -151,7 +151,7 @@ static int rcar_du_lvdsenc_get_resources(struct rcar_du_lvdsenc *lvds,
}
lvds->mmio = devm_ioremap_resource(&pdev->dev, mem);
- if (lvds->mmio == NULL) {
+ if (IS_ERR(lvds->mmio)) {
dev_err(&pdev->dev, "failed to remap memory resource for %s\n",
name);
return -ENOMEM;
--
1.8.3.4 (Apple Git-47)
next reply other threads:[~2013-12-08 2:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-08 2:41 ethan.zhao [this message]
2013-12-10 2:24 ` [PATCH] r_du_lvdsenc.c : Check return value of devm_ioremap_resource with IS_ERR Laurent Pinchart
2013-12-10 6:59 ` Ethan Zhao
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=1386470506-553-1-git-send-email-ethan.kernel@gmail.com \
--to=ethan.kernel@gmail.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
/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