]> git.baikalelectronics.ru Git - kernel.git/commitdiff
serial: 8250_pci: Get rid of redundant 'else' keyword
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 22 Oct 2021 13:51:46 +0000 (16:51 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Oct 2021 06:41:13 +0000 (08:41 +0200)
The 'else' keyword is not needed when previous conditional branch returns
to the upper layer. Get rid of redundant 'else' keyword in such cases.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Jiri Slaby <jslaby@kernel.org>
Link: https://lore.kernel.org/r/20211022135147.70965-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_pci.c

index 8a2f42507c18c6caaa438bc08b02bc39287afb0a..463b2c71da6f260e506f0b9de1000cbdafa22c61 100644 (file)
@@ -515,7 +515,7 @@ static int pci_siig_init(struct pci_dev *dev)
 
        if (type == 0x1000)
                return pci_siig10x_init(dev);
-       else if (type == 0x2000)
+       if (type == 0x2000)
                return pci_siig20x_init(dev);
 
        moan_device("Unknown SIIG card", dev);
@@ -792,9 +792,9 @@ static int pci_netmos_9900_setup(struct serial_private *priv,
                bar = 3 * idx;
 
                return setup_port(priv, port, bar, 0, board->reg_shift);
-       } else {
-               return pci_default_setup(priv, board, port, idx);
        }
+
+       return pci_default_setup(priv, board, port, idx);
 }
 
 /* the 99xx series comes with a range of device IDs and a variety