A ring R is said to be clean if every element of R is a sum of an idempotent and a unit. The class of clean rings is quite large and includes, for instance, semiperfect rings (and thus finite rings), and rings of linear transformations of vector spaces. We prove that the endomorphism ring of every continuous (or discrete) module is clean.