The situation you described may be the result of a failed or incomplete upgrade.
However your solution is likely to cause other problems
"In normal circumstances there is NEVER a need to run rpi-update as it always gets you to the leading edge firmware and kernel and because that may be a testing version it could leave your RPi unbootable". https://www.raspberrypi.org/forums/viewtopic.php?p=916911#p916911 Even the rpi-update documentation now warns "Even on Raspbian you should only use this with a good reason. This gets you the latest bleeding edge kernel/firmware."
sudo apt-get update; sudo apt-get install --reinstall raspberrypi-bootloader raspberrypi-kernel
will put it back to the latest supported kernel/bootcode.
PS The current supported kernel is 4.14.34
PPS The recommended kernel/bootcode upgrade also cleans up the modules, and does not leave a trail of obsolete modules like rpi-update