Not all Communists followed the same religion, though.
The USSR was ran by Jewish Bolshevism, although this fact is still unknown to the general public. Yeah, the Soviets had a "zero privacy" policy, but not all communist governments have it to the same degree.
On the other end of the communist spectrum, you have Yugoslavia which was a light socialist country, in which many religions were practiced: Catholicism, Orthodox Christianity, and Islam. However, the leader Marshall Tito did not impose one single religious views on the general public.
In Socialist regimes like East Germany, the leaders even discouraged religion, claiming it as an "atheist state". The people in the government put the ideology of Socialism before the ideology of religion.
China has a constitution of freedom of religion, but even if it didn't, the most common religions are Buddhism and Taoism, even a small percentage of Christians (given China's population, that's still a lot of people - 4% of 1.4 billion)