tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 13b424f97ef548612c760cfd0892f96de96707e0 commit: 1c30433d9fa5c5b48039990ba214c0e8e199a22d [5435/23701] sc16is7xx: missing unregister/delete driver on error in sc16is7xx_init() config: x86_64-randconfig-121-20240906 (https://download.01.org/0day-ci/archive/20240907/202409071206.ARybrxJe-lkp@i...) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240907/202409071206.ARybrxJe-lkp@i...)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot lkp@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202409071206.ARybrxJe-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/tty/serial/sc16is7xx.c:1501:1: sparse: sparse: unused label 'err_i2c' drivers/tty/serial/sc16is7xx.c: In function 'sc16is7xx_init':
drivers/tty/serial/sc16is7xx.c:1501:1: warning: label 'err_i2c' defined but not used [-Wunused-label]
1501 | err_i2c: | ^~~~~~~
vim +/err_i2c +1501 drivers/tty/serial/sc16is7xx.c
1487 1488 #ifdef CONFIG_SERIAL_SC16IS7XX_SPI 1489 ret = spi_register_driver(&sc16is7xx_spi_uart_driver); 1490 if (ret < 0) { 1491 pr_err("failed to init sc16is7xx spi --> %d\n", ret); 1492 goto err_spi; 1493 } 1494 #endif 1495 return ret; 1496 1497 err_spi: 1498 #ifdef CONFIG_SERIAL_SC16IS7XX_I2C 1499 i2c_del_driver(&sc16is7xx_i2c_uart_driver); 1500 #endif
1501 err_i2c:
1502 uart_unregister_driver(&sc16is7xx_uart); 1503 return ret; 1504 } 1505 module_init(sc16is7xx_init); 1506