It is narrated from Sayyiduna Abu Hurayrah (may Allah be pleased with him) that he would offer the funeral prayer over a newborn child who had breathed and had never committed any sin, and he would say: 'Allahumma ij'alhu lana salafan wa faratan wa dhukhra' (O Allah, make him for us a forerunner, a store for the Hereafter and a means of reward).
Nu'aym says: Some said: Do you offer the funeral prayer over one who never committed any sin? He would say: The funeral prayer was offered over the Messenger of Allah (peace and blessings be upon him) as well, while he (peace and blessings be upon him) was forgiven and in the rank of one who never disobeyed at all.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 6794