From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965937AbbLPPoO (ORCPT ); Wed, 16 Dec 2015 10:44:14 -0500 Received: from faui40.informatik.uni-erlangen.de ([131.188.34.40]:45451 "EHLO faui40.informatik.uni-erlangen.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965878AbbLPPoI (ORCPT ); Wed, 16 Dec 2015 10:44:08 -0500 From: Anton Wuerfel To: linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman , Jiri Slaby , "James E.J. Bottomley" , Helge Deller , Peter Hurley , Heikki Krogerus , Andy Shevchenko , Qipeng Zha , Desmond Liu , Wang Long , Matt Redfearn , Paul Burton , Ralf Baechle , Krzysztof Kozlowski , Peter Hung , Soeren Grunewald , Adam Lee , "Maciej S. Szmigiero" , Mans Rullgard , linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org, linux-kernel@i4.cs.fau.de, Anton Wuerfel , Phillip Raffeck Subject: [PATCH 05/11] tty: serial: 8250: Remove else after return Date: Wed, 16 Dec 2015 16:36:11 +0100 Message-Id: <1450280177-4460-6-git-send-email-anton.wuerfel@fau.de> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1450280177-4460-1-git-send-email-anton.wuerfel@fau.de> References: <1450280177-4460-1-git-send-email-anton.wuerfel@fau.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch fixes checkpatch warnings about unnecessary else blocks after return statements. Signed-off-by: Anton Würfel Signed-off-by: Phillip Raffeck CC: linux-kernel@i4.cs.fau.de --- drivers/tty/serial/8250/8250_pci.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c index 41508a5..3bc0303 100644 --- a/drivers/tty/serial/8250/8250_pci.c +++ b/drivers/tty/serial/8250/8250_pci.c @@ -806,10 +806,10 @@ static int pci_netmos_9900_numports(struct pci_dev *dev) pi = (c & 0xff); - if (pi == 2) { + if (pi == 2) return 1; - } else if ((pi == 0) && - (dev->device == PCI_DEVICE_ID_NETMOS_9900)) { + + if ((pi == 0) && (dev->device == PCI_DEVICE_ID_NETMOS_9900)) { /* two possibilities: 0x30ps encodes number of parallel and * serial ports, or 0x1000 indicates *something*. This is not * immediately obvious, since the 2s1p+4s configuration seems @@ -817,12 +817,11 @@ static int pci_netmos_9900_numports(struct pci_dev *dev) * advertising the same function 3 as the 4s+2s1p config. */ sub_serports = dev->subsystem_device & 0xf; - if (sub_serports > 0) { + if (sub_serports > 0) return sub_serports; - } else { - dev_err(&dev->dev, "NetMos/Mostech serial driver ignoring port on ambiguous config.\n"); - return 0; - } + + dev_err(&dev->dev, "NetMos/Mostech serial driver ignoring port on ambiguous config.\n"); + return 0; } moan_device("unknown NetMos/Mostech program interface", dev); -- 1.9.1