lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1452720561-28443-6-git-send-email-anton.wuerfel@fau.de>
Date:	Wed, 13 Jan 2016 22:29:11 +0100
From:	Anton Wuerfel <anton.wuerfel@....de>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	Jiri Slaby <jslaby@...e.com>,
	"James E.J. Bottomley" <jejb@...isc-linux.org>,
	Helge Deller <deller@....de>,
	Joachim Eastwood <manabian@...il.com>,
	Matthias Brugger <matthias.bgg@...il.com>,
	Masahiro Yamada <yamada.masahiro@...ionext.com>,
	Peter Hurley <peter@...leysoftware.com>,
	Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
	Phillip Raffeck <phillip.raffeck@....de>,
	Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
	Peter Hung <hpeter@...il.com>, linux-serial@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-parisc@...r.kernel.org,
	linux-kernel@...cs.fau.de, Anton Wuerfel <anton.wuerfel@....de>
Subject: [PATCH v6 05/15] tty: serial: 8250: Remove else after return

This patch fixes checkpatch warnings about unnecessary else blocks after
return statements.

Signed-off-by: Anton Würfel <anton.wuerfel@....de>
Signed-off-by: Phillip Raffeck <phillip.raffeck@....de>
Cc: linux-kernel@...cs.fau.de
---
 drivers/tty/serial/8250/8250_pci.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
index 534ca18..8543719 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -805,10 +805,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
@@ -816,12 +816,12 @@ 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ