Flux pinning is investigated in a thin type-II superconducting film covering a ferromagnetic Co/Pt film with perpendicular anisotropy. Stable bubble domains with varying size and density can be created in the ferromagnet by means of different magnetization procedures. The flux pinning is strongly depending on this magnetic domain structure, resulting in asymmetric magnetization curves with respect to the field polarity.