Sahih Bukhari Volume 2, Book 26, Hadith Number 792.

Narated By ‘Abdullah bin ‘Amr  : Allah’s Apostle stopped (for a while near the Jimar at Mina) during his last Hajj and the people started asking him questions. A man said, “Ignorantly I got my head shaved before slaughtering.” The Prophet replied, “Slaughter (now) and there is no harm in it.” Another man said, “Unknowingly I slaughtered the Hadi before doing the Rami.” The Prophet said, “Do Rami now and there is no harm in it.” So, on that day, when the Prophet was asked about anything (about the ceremonies of Hajj) done before or after (its stated time) his reply was, “Do it (now) and there is no harm.”