From: Dan Carpenter <dan.carpenter@oracle.com>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [PATCH 2/2] slimbus: qcom-ctrl: Fix devm_ioremap_resource() error handling
Date: Tue, 9 Jan 2018 12:26:44 +0300 [thread overview]
Message-ID: <20180109092644.wa4ubwxkcvc3lyza@mwanda> (raw)
In-Reply-To: <20180109092616.mfha2rs56oaxfjaz@mwanda>
devm_ioremap_resource() returns error pointers, not NULL so the check
needs to be fixed.
Fixes: ad7fcbc308b0 ("slimbus: qcom: Add Qualcomm Slimbus controller driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/slimbus/qcom-ctrl.c b/drivers/slimbus/qcom-ctrl.c
index 3ab59209cbdc..6bf95bf33299 100644
--- a/drivers/slimbus/qcom-ctrl.c
+++ b/drivers/slimbus/qcom-ctrl.c
@@ -528,9 +528,9 @@ static int qcom_slim_probe(struct platform_device *pdev)
slim_mem = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ctrl");
ctrl->base = devm_ioremap_resource(ctrl->dev, slim_mem);
- if (!ctrl->base) {
+ if (IS_ERR(ctrl->base)) {
dev_err(&pdev->dev, "IOremap failed\n");
- return -ENOMEM;
+ return PTR_ERR(ctrl->base);
}
sctrl->set_laddr = qcom_set_laddr;
next prev parent reply other threads:[~2018-01-09 9:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-09 9:26 [PATCH 1/2] slimbus: qcom-ctrl: fix a NULL test Dan Carpenter
2018-01-09 9:26 ` Dan Carpenter [this message]
2018-01-09 9:48 ` [PATCH 2/2] slimbus: qcom-ctrl: Fix devm_ioremap_resource() error handling Srinivas Kandagatla
2018-01-09 9:48 ` [PATCH 1/2] slimbus: qcom-ctrl: fix a NULL test Srinivas Kandagatla
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=20180109092644.wa4ubwxkcvc3lyza@mwanda \
--to=dan.carpenter@oracle.com \
--cc=alsa-devel@alsa-project.org \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=srinivas.kandagatla@linaro.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
all inboxes | Powered by JetHome®