From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: tglx@linutronix.de
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 1/5] clocksource/drivers/timer-of: Fix invalid iomap check
Date: Tue, 27 Jun 2017 11:26:56 +0200 [thread overview]
Message-ID: <1498555620-25094-1-git-send-email-daniel.lezcano@linaro.org> (raw)
In-Reply-To: <20170627092239.GE2479@mai>
A typo in the code checks the return value of iomap against !NULL
and, thus, fails everytime the mapping succeed.
Fix this by inverting the condition in the check.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
drivers/clocksource/timer-of.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clocksource/timer-of.c b/drivers/clocksource/timer-of.c
index 64b1c20..f6e7491 100644
--- a/drivers/clocksource/timer-of.c
+++ b/drivers/clocksource/timer-of.c
@@ -120,7 +120,7 @@ static __init int timer_base_init(struct device_node *np,
const char *name = of_base->name ? of_base->name : np->full_name;
of_base->base = of_io_request_and_map(np, of_base->index, name);
- if (of_base->base) {
+ if (!of_base->base) {
pr_err("Failed to iomap (%s)\n", name);
return -ENXIO;
}
--
2.7.4
next prev parent reply other threads:[~2017-06-27 9:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-27 9:22 [GIT PULL] clockevents changes for 4.13 Daniel Lezcano
2017-06-27 9:26 ` Daniel Lezcano [this message]
2017-06-27 9:26 ` [PATCH 2/5] clocksource/drivers/sun4i: Switch to the timer-of common init Daniel Lezcano
2017-06-27 9:26 ` [PATCH 3/5] clocksource/drivers/tcb_clksrc: Make IO endian agnostic Daniel Lezcano
2017-06-27 9:26 ` [PATCH 4/5] clocksource/drivers/fsl_ftm_timer: Unmap region obtained by of_iomap Daniel Lezcano
2017-06-27 9:27 ` [PATCH 5/5] clocksource/drivers/mips-gic-timer: Fix an error code in 'gic_clocksource_of_init()' Daniel Lezcano
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=1498555620-25094-1-git-send-email-daniel.lezcano@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/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