mirror of https://gitee.com/openkylin/linux.git
sc16is7xx: move label 'err_spi' to correct section
err_spi is used when SERIAL_SC16IS7XX_SPI is enabled, so make
the label only available under SERIAL_SC16IS7XX_SPI option.
Otherwise, the below warning appears.
drivers/tty/serial/sc16is7xx.c:1523:1: warning: label ‘err_spi’ defined but not used [-Wunused-label]
err_spi:
^~~~~~~
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Fixes: ac0cdb3d99
("sc16is7xx: missing unregister/delete driver on error in sc16is7xx_init()")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
6b87784b53
commit
e00164a0f0
|
@ -1520,10 +1520,12 @@ static int __init sc16is7xx_init(void)
|
|||
#endif
|
||||
return ret;
|
||||
|
||||
#ifdef CONFIG_SERIAL_SC16IS7XX_SPI
|
||||
err_spi:
|
||||
#ifdef CONFIG_SERIAL_SC16IS7XX_I2C
|
||||
i2c_del_driver(&sc16is7xx_i2c_uart_driver);
|
||||
#endif
|
||||
#endif
|
||||
err_i2c:
|
||||
uart_unregister_driver(&sc16is7xx_uart);
|
||||
return ret;
|
||||
|
|
Loading…
Reference in New Issue