blob: 8d1af298b65bff1c819295c486209e0be0a27867 [file] [log] [blame]
From 09dfd1ebc4ac759bc43ff50debf53ffe339135f8 Mon Sep 17 00:00:00 2001
From: Paul Mundt <lethal@linux-sh.org>
Date: Wed, 3 Aug 2011 12:33:20 +0900
Subject: serial: sh-sci: Fix up default regtype probing.
Presently the default regtype probing inadvertently bails out due to an
inverted error check. This fixes it up, and gets platforms without
explicit regtype specifications working again.
Reported-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
(cherry picked from commit ad75b88ac3792ae6a541d9b9fa84e379bd0b29dd)
Signed-off-by: Simon Horman <horms@verge.net.au>
---
drivers/tty/serial/sh-sci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index a0a1943..013b894 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -1894,7 +1894,7 @@ static int __devinit sci_init_single(struct platform_device *dev,
if (p->regtype == SCIx_PROBE_REGTYPE) {
ret = sci_probe_regmap(p);
- if (unlikely(!ret))
+ if (unlikely(ret != 0))
return ret;
}
--
1.7.10