From patchwork Wed Jan 16 22:25:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cong Ding X-Patchwork-Id: 1993571 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 1F52BDF2A2 for ; Wed, 16 Jan 2013 22:34:23 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TvbW2-0000pm-IN; Wed, 16 Jan 2013 22:31:26 +0000 Received: from mail-ee0-f43.google.com ([74.125.83.43]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TvbVu-0000o4-9g for linux-arm-kernel@lists.infradead.org; Wed, 16 Jan 2013 22:31:19 +0000 Received: by mail-ee0-f43.google.com with SMTP id c50so926554eek.2 for ; Wed, 16 Jan 2013 14:31:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=GtPD/AUCYunOeRD6Y3cZB+Ez679OwUc61adL9MmCS+Y=; b=qz9xw5sR3opNk9mDxK9zdZK3c3NEcaM3ryAUFxXYFJpkj3S6Qrg4Ohg9ndHuvHLvu/ H4FFvQY8kS9BDzN78j1Hoaus4pRZlBsMwTKXcPhJBVi3cYNKfcI9IPqbVi2gl18YYmWn 2puN6wOi678PTLSrVze5PgIZvaBXo2vN3HIzhRXBBr7He6DBELvJhk9xRR/7ORMpkUO5 2gUzSrfgCjM0mSnI541K6LMuKppI9d38EG1mphTVpWuw0rzVmsJSEng7RGijr71ZpgJt 6LrT7eisT/O6NZEd07lmScZ49DkMv771OUsvV7Vt+1yRI3zGmmiBKNYPhrWLZA+wVS7v wPjw== X-Received: by 10.14.219.3 with SMTP id l3mr6480772eep.5.1358375476137; Wed, 16 Jan 2013 14:31:16 -0800 (PST) Received: from localhost.localdomain (77.47.90.154.dynamic.cablesurf.de. [77.47.90.154]) by mx.google.com with ESMTPS id d3sm31353482eeo.13.2013.01.16.14.31.14 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 16 Jan 2013 14:31:15 -0800 (PST) From: Cong Ding To: Tony Prisk , Alan Cox , Greg Kroah-Hartman , Jiri Slaby , linux-arm-kernel@lists.infradead.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] tty: serial/vt8500_serial.c: fix bug caused by missing "{}" Date: Wed, 16 Jan 2013 23:25:03 +0100 Message-Id: <1358375103-11703-1-git-send-email-dinggnu@gmail.com> X-Mailer: git-send-email 1.7.10.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130116_173119_474732_D6D54087 X-CRM114-Status: GOOD ( 12.73 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dinggnu[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.83.43 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Cong Ding X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org It is obviously here should be braced by "{}" in the "if" branch (more than 1 line in the "if" branch), and by the coding style document of the kernel I also add "{}" to the else branch. Signed-off-by: Cong Ding --- drivers/tty/serial/vt8500_serial.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/vt8500_serial.c b/drivers/tty/serial/vt8500_serial.c index 8fd1814..ac46a6e 100644 --- a/drivers/tty/serial/vt8500_serial.c +++ b/drivers/tty/serial/vt8500_serial.c @@ -567,12 +567,13 @@ static int vt8500_serial_probe(struct platform_device *pdev) if (!mmres || !irqres) return -ENODEV; - if (np) + if (np) { port = of_alias_get_id(np, "serial"); if (port > VT8500_MAX_PORTS) port = -1; - else + } else { port = -1; + } if (port < 0) { /* calculate the port id */