From patchwork Sun Aug 7 22:26:50 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafael Wysocki X-Patchwork-Id: 1042822 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p77MQLOH026009 for ; Sun, 7 Aug 2011 22:26:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755466Ab1HGW0U (ORCPT ); Sun, 7 Aug 2011 18:26:20 -0400 Received: from ogre.sisk.pl ([217.79.144.158]:52688 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755395Ab1HGW0U (ORCPT ); Sun, 7 Aug 2011 18:26:20 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by ogre.sisk.pl (Postfix) with ESMTP id F14851B72C9; Sun, 7 Aug 2011 23:49:59 +0200 (CEST) Received: from ogre.sisk.pl ([127.0.0.1]) by localhost (ogre.sisk.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 28660-08; Sun, 7 Aug 2011 23:49:37 +0200 (CEST) Received: from ferrari.rjw.lan (unknown [82.210.184.220]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ogre.sisk.pl (Postfix) with ESMTP id C999C1B7254; Sun, 7 Aug 2011 23:49:37 +0200 (CEST) From: "Rafael J. Wysocki" To: lethal@linux-sh.org Subject: [PATCH] sh: Fix boot crash related to SCI Date: Mon, 8 Aug 2011 00:26:50 +0200 User-Agent: KMail/1.13.6 (Linux/3.0.0+; KDE/4.6.0; x86_64; ; ) Cc: Linus Torvalds , LKML , linux-sh@vger.kernel.org, Magnus Damm MIME-Version: 1.0 Message-Id: <201108080026.50989.rjw@sisk.pl> X-Virus-Scanned: amavisd-new at ogre.sisk.pl using MkS_Vir for Linux Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Sun, 07 Aug 2011 22:26:21 +0000 (UTC) From: Rafael J. Wysocki 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 --- drivers/tty/serial/sh-sci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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; }