From: Dan Carpenter <dan.carpenter@oracle.com>
To: Will Deacon <will@kernel.org>,
Bhaskara Budiredla <bbudiredla@marvell.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH] drivers: perf: marvell_cn10k: fix an IS_ERR() vs NULL check
Date: Fri, 17 Dec 2021 17:59:08 +0300 [thread overview]
Message-ID: <20211217145907.GA16611@kili> (raw)
The devm_ioremap() function does not return error pointers. It returns
NULL.
Fixes: 036a7584bede ("drivers: perf: Add LLC-TAD perf counter support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
When you're adding a new driver please use the correct prefix for the
first commit:
Bad: subsystem: Add new driver for Fancy New Hardware
Good: subsystem/new_hdwr: Add new driver for Fancy New Hardware
Otherwise it's impossible to guess which prefix you prefer.
drivers/perf/marvell_cn10k_tad_pmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/perf/marvell_cn10k_tad_pmu.c b/drivers/perf/marvell_cn10k_tad_pmu.c
index 250dd4c52d70..7f4d292658e3 100644
--- a/drivers/perf/marvell_cn10k_tad_pmu.c
+++ b/drivers/perf/marvell_cn10k_tad_pmu.c
@@ -312,7 +312,7 @@ static int tad_pmu_probe(struct platform_device *pdev)
regions[i].base = devm_ioremap(&pdev->dev,
res->start,
tad_pmu_page_size);
- if (IS_ERR(regions[i].base)) {
+ if (!regions[i].base) {
dev_err(&pdev->dev, "TAD%d ioremap fail\n", i);
return -ENOMEM;
}
--
2.20.1
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Will Deacon <will@kernel.org>,
Bhaskara Budiredla <bbudiredla@marvell.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH] drivers: perf: marvell_cn10k: fix an IS_ERR() vs NULL check
Date: Fri, 17 Dec 2021 17:59:08 +0300 [thread overview]
Message-ID: <20211217145907.GA16611@kili> (raw)
The devm_ioremap() function does not return error pointers. It returns
NULL.
Fixes: 036a7584bede ("drivers: perf: Add LLC-TAD perf counter support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
When you're adding a new driver please use the correct prefix for the
first commit:
Bad: subsystem: Add new driver for Fancy New Hardware
Good: subsystem/new_hdwr: Add new driver for Fancy New Hardware
Otherwise it's impossible to guess which prefix you prefer.
drivers/perf/marvell_cn10k_tad_pmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/perf/marvell_cn10k_tad_pmu.c b/drivers/perf/marvell_cn10k_tad_pmu.c
index 250dd4c52d70..7f4d292658e3 100644
--- a/drivers/perf/marvell_cn10k_tad_pmu.c
+++ b/drivers/perf/marvell_cn10k_tad_pmu.c
@@ -312,7 +312,7 @@ static int tad_pmu_probe(struct platform_device *pdev)
regions[i].base = devm_ioremap(&pdev->dev,
res->start,
tad_pmu_page_size);
- if (IS_ERR(regions[i].base)) {
+ if (!regions[i].base) {
dev_err(&pdev->dev, "TAD%d ioremap fail\n", i);
return -ENOMEM;
}
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2021-12-17 14:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-17 14:59 Dan Carpenter [this message]
2021-12-17 14:59 ` [PATCH] drivers: perf: marvell_cn10k: fix an IS_ERR() vs NULL check Dan Carpenter
2022-01-05 17:31 ` Will Deacon
2022-01-05 17:31 ` Will Deacon
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=20211217145907.GA16611@kili \
--to=dan.carpenter@oracle.com \
--cc=bbudiredla@marvell.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=will@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.