]> git.baikalelectronics.ru Git - kernel.git/commitdiff
sc16is7xx: put err_spi and err_i2c into correct #ifdef
authorGuoqing Jiang <gqjiang@suse.com>
Thu, 18 Apr 2019 02:01:55 +0000 (10:01 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 19 Apr 2019 12:09:23 +0000 (14:09 +0200)
err_spi is only called within SERIAL_SC16IS7XX_SPI
while err_i2c is called inside SERIAL_SC16IS7XX_I2C.
So we need to put err_spi and err_i2c into each #ifdef
accordingly.

This change fixes ("sc16is7xx: move label 'err_spi'
to correct section").

Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sc16is7xx.c

index 22381a8c72e439394813cc8d84c15740c8754bdf..a31db15cd7c0d36bf2e4dee32d7b1201bc2674c5 100644 (file)
@@ -1522,11 +1522,11 @@ static int __init sc16is7xx_init(void)
 
 #ifdef CONFIG_SERIAL_SC16IS7XX_SPI
 err_spi:
+#endif
 #ifdef CONFIG_SERIAL_SC16IS7XX_I2C
        i2c_del_driver(&sc16is7xx_i2c_uart_driver);
-#endif
-#endif
 err_i2c:
+#endif
        uart_unregister_driver(&sc16is7xx_uart);
        return ret;
 }