From: Rafael J. Wysocki Date: Sun, 7 Aug 2011 22:26:50 +0000 (+0200) Subject: sh: Fix boot crash related to SCI X-Git-Tag: firefly_0821_release~3680^2~4694 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=fc97114b8d67819fadcc5af855da9a3e6a6a329b;p=firefly-linux-kernel-4.4.55.git sh: Fix boot crash related to SCI 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 Signed-off-by: Linus Torvalds --- diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index d0a56235c50e..2ec57b2fb278 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -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; }