Do you think that there is any thing for me (of he reward with the Lord) for the deed of religious purification that I did in the state of ignorance? Upon this he (the Messenger of Allah) said to him: You accepted Islam with all the previous virtues that you practised.
Sahih Muslim Book 1, Hadith 230