Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1675441

[PATCH 1/5] clocksource/drivers/timer-of: Fix invalid iomap check

From Daniel Lezcano <daniel.lezcano@linaro.org>
Newsgroups linux.kernel
Subject [PATCH 1/5] clocksource/drivers/timer-of: Fix invalid iomap check
Date 2017-06-27 11:30 +0200
Message-ID <tWUYN-6V2-7@gated-at.bofh.it> (permalink)
References <tWUYN-6V2-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[GIT PULL] clockevents changes for 4.13 Daniel Lezcano <daniel.lezcano@linaro.org> - 2017-06-27 11:30 +0200
  [PATCH 1/5] clocksource/drivers/timer-of: Fix invalid iomap check Daniel Lezcano <daniel.lezcano@linaro.org> - 2017-06-27 11:30 +0200
    [PATCH 2/5] clocksource/drivers/sun4i: Switch to the timer-of common init Daniel Lezcano <daniel.lezcano@linaro.org> - 2017-06-27 11:30 +0200
    [PATCH 4/5] clocksource/drivers/fsl_ftm_timer: Unmap region obtained by of_iomap Daniel Lezcano <daniel.lezcano@linaro.org> - 2017-06-27 11:30 +0200
    [PATCH 3/5] clocksource/drivers/tcb_clksrc: Make IO endian agnostic Daniel Lezcano <daniel.lezcano@linaro.org> - 2017-06-27 11:30 +0200

csiph-web