From patchwork Mon Mar 28 02:34:35 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nobuhiro Iwamatsu X-Patchwork-Id: 667151 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p2S2Z3vl031441 for ; Mon, 28 Mar 2011 02:35:03 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753715Ab1C1Cet (ORCPT ); Sun, 27 Mar 2011 22:34:49 -0400 Received: from mail-iy0-f174.google.com ([209.85.210.174]:52561 "EHLO mail-iy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753659Ab1C1Ceh (ORCPT ); Sun, 27 Mar 2011 22:34:37 -0400 Received: by iyb14 with SMTP id 14so2627346iyb.19 for ; Sun, 27 Mar 2011 19:34:37 -0700 (PDT) Received: by 10.43.69.197 with SMTP id yd5mr1445268icb.362.1301279677078; Sun, 27 Mar 2011 19:34:37 -0700 (PDT) Received: from chimagu (w142187.ppp.asahi-net.or.jp [121.1.142.187]) by mx.google.com with ESMTPS id mv26sm2610918ibb.62.2011.03.27.19.34.35 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 27 Mar 2011 19:34:36 -0700 (PDT) Received: from iwamatsu by chimagu with local (Exim 4.74) (envelope-from ) id 1Q42Hs-0004J2-8i; Mon, 28 Mar 2011 11:34:36 +0900 From: Nobuhiro Iwamatsu To: linux-sh@vger.kernel.org Cc: Nobuhiro Iwamatsu Subject: [PATCH] sh: sh-sci: Check initialization for earlyprintk Date: Mon, 28 Mar 2011 11:34:35 +0900 Message-Id: <1301279675-16519-1-git-send-email-iwamatsu@nigauri.org> X-Mailer: git-send-email 1.7.4.1 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 (demeter1.kernel.org [140.211.167.41]); Mon, 28 Mar 2011 02:35:03 +0000 (UTC) diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index eb7958c..cc4c329 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -1836,6 +1836,9 @@ static int __devinit serial_console_setup(struct console *co, char *options) sci_port = &sci_ports[co->index]; port = &sci_port->port; + if (port->ops == NULL) + return -ENODEV; + ret = sci_remap_port(port); if (unlikely(ret != 0)) return ret;