[tip:timers/core] clocksource/drivers/timer-of: Fix invalid iomap check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  22ece4e3df6335e691207de1198a609e761b8640
Gitweb:     http://git.kernel.org/tip/22ece4e3df6335e691207de1198a609e761b8640
Author:     Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>
AuthorDate: Tue, 20 Jun 2017 07:51:11 +0200
Committer:  Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>
CommitDate: Mon, 26 Jun 2017 18:32:04 +0200

clocksource/drivers/timer-of: Fix invalid iomap check

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@xxxxxxxxxx>
---
 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;
 	}
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux