Skip to content

Commit fc97114

Browse files
rjwysockitorvalds
authored andcommitted
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 <rjw@sisk.pl> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent f23c126 commit fc97114

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/tty/serial/sh-sci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1889,7 +1889,7 @@ static int __devinit sci_init_single(struct platform_device *dev,
18891889

18901890
if (p->regtype == SCIx_PROBE_REGTYPE) {
18911891
ret = sci_probe_regmap(p);
1892-
if (unlikely(!ret))
1892+
if (unlikely(ret))
18931893
return ret;
18941894
}
18951895

0 commit comments

Comments
 (0)