We have clarified the origin of equilibrium charges in poly(3-hexylthiophene):[6,6]-phenyl-C61-butyric acid methyl ester devices by using charge extraction by a linearly increasing voltage. By varying the work function of the contacts we find that the equilibrium charges are injected from the contacts due to energy level alignment caused by Fermi-level pinning.