]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
sh: Fix boot crash related to SCI
authorRafael J. Wysocki <rjw@sisk.pl>
Sun, 7 Aug 2011 22:26:50 +0000 (00:26 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 7 Aug 2011 22:51:45 +0000 (15:51 -0700)
Commit d006199e72a9 ("serial: sh-sci: Regtype probing doesn't need to be
fatal.") made sci_init_single() return when sci_probe_regmap() succeeds,
although it should return when sci_probe_regmap() fails.  This causes
systems using the serial sh-sci driver to crash during boot.

Fix the problem by using the right return condition.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/tty/serial/sh-sci.c

index d0a56235c50eedc5e9ed4dd9097e0b86b504ebda..2ec57b2fb2783a232df5aad9df1a276a6f2edd1e 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))
                        return ret;
        }