* [PATCH] serial: sc16is7xx: fix unused label warning
@ 2019-04-16 12:33 Arnd Bergmann
2019-04-16 13:11 ` Greg Kroah-Hartman
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2019-04-16 12:33 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby
Cc: Arnd Bergmann, Phil Elwell, Gustavo A. R. Silva, Stefan Potyra,
Mao Wenan, linux-serial, linux-kernel
A bugfix introduced a harmless warning:
drivers/tty/serial/sc16is7xx.c:1523:1: error: unused label 'err_spi' [-Werror,-Wunused-label]
Move each label inside the correct #ifdef.
Fixes: ac0cdb3d9901 ("sc16is7xx: missing unregister/delete driver on error in sc16is7xx_init()")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/tty/serial/sc16is7xx.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
index 09a183dfc526..a31db15cd7c0 100644
--- a/drivers/tty/serial/sc16is7xx.c
+++ b/drivers/tty/serial/sc16is7xx.c
@@ -1520,11 +1520,13 @@ static int __init sc16is7xx_init(void)
#endif
return ret;
+#ifdef CONFIG_SERIAL_SC16IS7XX_SPI
err_spi:
+#endif
#ifdef CONFIG_SERIAL_SC16IS7XX_I2C
i2c_del_driver(&sc16is7xx_i2c_uart_driver);
-#endif
err_i2c:
+#endif
uart_unregister_driver(&sc16is7xx_uart);
return ret;
}
--
2.20.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] serial: sc16is7xx: fix unused label warning
2019-04-16 12:33 [PATCH] serial: sc16is7xx: fix unused label warning Arnd Bergmann
@ 2019-04-16 13:11 ` Greg Kroah-Hartman
0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2019-04-16 13:11 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Jiri Slaby, Phil Elwell, Gustavo A. R. Silva, Stefan Potyra,
Mao Wenan, linux-serial, linux-kernel
On Tue, Apr 16, 2019 at 02:33:14PM +0200, Arnd Bergmann wrote:
> A bugfix introduced a harmless warning:
>
> drivers/tty/serial/sc16is7xx.c:1523:1: error: unused label 'err_spi' [-Werror,-Wunused-label]
>
> Move each label inside the correct #ifdef.
>
> Fixes: ac0cdb3d9901 ("sc16is7xx: missing unregister/delete driver on error in sc16is7xx_init()")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/tty/serial/sc16is7xx.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Someone sent this same patch a week earlier. I'll merge yours into
it...
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-04-16 13:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-16 12:33 [PATCH] serial: sc16is7xx: fix unused label warning Arnd Bergmann
2019-04-16 13:11 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).