The gain margin of optimal controllers of bang-band type is considered. It is shown that the gain margin is infinite if the switching surface is such that trajectories that reach it stay in the surface. For other types of switching surface an example shows that the behavior is more complicated when the gain is increased.