drivers/usb/host/ohci-hcd.c:1318 ohci_hcd_mod_init() warn: ignoring unreachable code.

From: Dan Carpenter
Date: Tue Mar 16 2021 - 04:33:50 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 1a4431a5db2bf800c647ee0ed87f2727b8d6c29c
commit: bbd7ffdbef6888459f301c5889f3b14ada38b913 clk: Allow the common clk framework to be selectable
config: arm-randconfig-m031-20210316 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

smatch warnings:
drivers/usb/host/ohci-hcd.c:1318 ohci_hcd_mod_init() warn: ignoring unreachable code.

vim +1318 drivers/usb/host/ohci-hcd.c

78c73414f4f674 Dmitry Eremin-Solenikov 2008-10-08 1313
5e16fabe5dbcff Sylvain Munaut 2006-12-13 1314 return retval;
^^^^^^^^^^^^^

5e16fabe5dbcff Sylvain Munaut 2006-12-13 1315
5e16fabe5dbcff Sylvain Munaut 2006-12-13 1316 /* Error path */
78c73414f4f674 Dmitry Eremin-Solenikov 2008-10-08 1317 #ifdef TMIO_OHCI_DRIVER
78c73414f4f674 Dmitry Eremin-Solenikov 2008-10-08 @1318 platform_driver_unregister(&TMIO_OHCI_DRIVER);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Unreachable

78c73414f4f674 Dmitry Eremin-Solenikov 2008-10-08 1319 error_tmio:
78c73414f4f674 Dmitry Eremin-Solenikov 2008-10-08 1320 #endif
3ee38d8bf46b36 Ben Dooks 2008-06-08 1321 #ifdef SM501_OHCI_DRIVER
78c73414f4f674 Dmitry Eremin-Solenikov 2008-10-08 1322 platform_driver_unregister(&SM501_OHCI_DRIVER);
3ee38d8bf46b36 Ben Dooks 2008-06-08 1323 error_sm501:
3ee38d8bf46b36 Ben Dooks 2008-06-08 1324 #endif
de44743b033942 Benjamin Herrenschmidt 2007-01-15 1325 #ifdef SA1111_DRIVER
de44743b033942 Benjamin Herrenschmidt 2007-01-15 1326 sa1111_driver_unregister(&SA1111_DRIVER);
de44743b033942 Benjamin Herrenschmidt 2007-01-15 1327 error_sa1111:
5e16fabe5dbcff Sylvain Munaut 2006-12-13 1328 #endif
495a678fc62e85 Sylvain Munaut 2006-12-13 1329 #ifdef OF_PLATFORM_DRIVER
d35fb6417655eb Grant Likely 2011-02-22 1330 platform_driver_unregister(&OF_PLATFORM_DRIVER);
de44743b033942 Benjamin Herrenschmidt 2007-01-15 1331 error_of_platform:
495a678fc62e85 Sylvain Munaut 2006-12-13 1332 #endif
6a6c957eba2081 Geoff Levand 2007-01-15 1333 #ifdef PS3_SYSTEM_BUS_DRIVER
7a4eb7fd50d4df Geoff Levand 2007-06-05 1334 ps3_ohci_driver_unregister(&PS3_SYSTEM_BUS_DRIVER);
6a6c957eba2081 Geoff Levand 2007-01-15 1335 error_ps3:
5e16fabe5dbcff Sylvain Munaut 2006-12-13 1336 #endif
684c19e0d95f46 Tony Jones 2007-09-11 1337 debugfs_remove(ohci_debug_root);
684c19e0d95f46 Tony Jones 2007-09-11 1338 ohci_debug_root = NULL;
684c19e0d95f46 Tony Jones 2007-09-11 1339
9beeee6584b9aa Alan Stern 2008-10-02 1340 clear_bit(USB_OHCI_LOADED, &usb_hcds_loaded);
5e16fabe5dbcff Sylvain Munaut 2006-12-13 1341 return retval;
5e16fabe5dbcff Sylvain Munaut 2006-12-13 1342 }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip