sc16is7xx: put err_spi and err_i2c into correct #ifdef

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>
This commit is contained in:
Guoqing Jiang 2019-04-18 10:01:55 +08:00 committed by Greg Kroah-Hartman
parent b2ecf00631
commit c53051128b

View 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;
}