Skip to content

Commit

Permalink
sc16is7xx: put err_spi and err_i2c into correct #ifdef
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
GuoqingJiang authored and gregkh committed Apr 19, 2019
1 parent b2ecf00 commit c530511
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/tty/serial/sc16is7xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit c530511

Please sign in to comment.