[PATCH 5.11 143/601] serial: stm32: fix code cleaning warnings and checks