Skip to content

Commit

Permalink
sh: Fix boot crash related to SCI
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
rjwysocki authored and torvalds committed Aug 7, 2011
1 parent f23c126 commit fc97114
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/tty/serial/sh-sci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit fc97114

Please sign in to comment.