serial.flush()

It isn't even necessary to store the value returned anywhere. Not doing so will save a few clock cycles.