diff options
author | Anton Wuerfel <anton.wuerfel@fau.de> | 2016-01-14 16:08:14 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-06 23:15:53 -0800 |
commit | c2f5fde143b47136dc8f8b7a2ce65d9bf6286c12 (patch) | |
tree | cf887126e1fc7690c90439042182c3a131769d0c /drivers/tty | |
parent | 740dc2defc476e58f7b6f3f6265d196b1b744c25 (diff) | |
download | linux-c2f5fde143b47136dc8f8b7a2ce65d9bf6286c12.tar.bz2 |
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@fau.de>
Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-kernel@i4.cs.fau.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/8250/8250_pci.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c index 4186eb136f02..123319738a89 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); |