[Peripherals] Clean up/Fix things found by Cppcheck