Commit c5305112 authored by Guoqing Jiang's avatar Guoqing Jiang Committed by Greg Kroah-Hartman

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: default avatarGuoqing Jiang <gqjiang@suse.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b2ecf006
...@@ -1522,11 +1522,11 @@ static int __init sc16is7xx_init(void) ...@@ -1522,11 +1522,11 @@ static int __init sc16is7xx_init(void)
#ifdef CONFIG_SERIAL_SC16IS7XX_SPI #ifdef CONFIG_SERIAL_SC16IS7XX_SPI
err_spi: err_spi:
#endif
#ifdef CONFIG_SERIAL_SC16IS7XX_I2C #ifdef CONFIG_SERIAL_SC16IS7XX_I2C
i2c_del_driver(&sc16is7xx_i2c_uart_driver); i2c_del_driver(&sc16is7xx_i2c_uart_driver);
#endif
#endif
err_i2c: err_i2c:
#endif
uart_unregister_driver(&sc16is7xx_uart); uart_unregister_driver(&sc16is7xx_uart);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment