Commit b48b0167 authored by Guoqing Jiang's avatar Guoqing Jiang Committed by Khalid Elmously

sc16is7xx: move label 'err_spi' to correct section

BugLink: https://bugs.launchpad.net/bugs/1883917

commit e00164a0 upstream.

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: default avatarGuoqing Jiang <gqjiang@suse.com>
Fixes: ac0cdb3d ("sc16is7xx: missing unregister/delete driver on error in sc16is7xx_init()")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
parent 21375fb3
...@@ -1489,10 +1489,12 @@ static int __init sc16is7xx_init(void) ...@@ -1489,10 +1489,12 @@ static int __init sc16is7xx_init(void)
#endif #endif
return ret; return ret;
#ifdef CONFIG_SERIAL_SC16IS7XX_SPI
err_spi: err_spi:
#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
#endif
err_i2c: err_i2c:
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