linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sh: Fix boot crash related to SCI
@ 2011-08-07 22:26 Rafael J. Wysocki
  0 siblings, 0 replies; only message in thread
From: Rafael J. Wysocki @ 2011-08-07 22:26 UTC (permalink / raw)
  To: lethal; +Cc: Linus Torvalds, LKML, linux-sh, Magnus Damm

From: Rafael J. Wysocki <rjw@sisk.pl>

Commit d006199e72a9cf9537ff567ffa07c3f343b9182a (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>
---
 drivers/tty/serial/sh-sci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/drivers/tty/serial/sh-sci.c
===================================================================
--- linux-2.6.orig/drivers/tty/serial/sh-sci.c
+++ linux-2.6/drivers/tty/serial/sh-sci.c
@@ -1889,7 +1889,7 @@ static int __devinit sci_init_single(str
 
 	if (p->regtype == SCIx_PROBE_REGTYPE) {
 		ret = sci_probe_regmap(p);
-		if (unlikely(!ret))
+		if (unlikely(ret))
 			return ret;
 	}
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-08-07 22:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-07 22:26 [PATCH] sh: Fix boot crash related to SCI Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).