serial: sh-sci: Fix up default regtype probing.
authorPaul Mundt <lethal@linux-sh.org>
Wed, 3 Aug 2011 03:33:20 +0000 (12:33 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Wed, 3 Aug 2011 03:33:20 +0000 (12:33 +0900)
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>
drivers/tty/serial/sh-sci.c

index d0a5623..522f69d 100644 (file)
@@ -1889,7 +1889,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;
        }