Mishkat al-Masabih 111
‘A’isha said:
I asked, “Messenger of God, what happens to the offspring of believers?’’ He replied, “They are joined to their parents." I asked, “Although they have done nothing, messenger of God” lie replied, “God knows best what they were doing.” I asked, “What happens to the offspring of polytheists?” He replied, “They are joined to their parents.” I asked, “Although they have done nothing?” He replied, “God knows best what they were doing.” 

Abu Dawud transmitted it.
وَعَنْ عَائِشَةَ رَضِيَ اللَّهُ عَنْهَا قَالَتْ: قُلْتُ: يَا رَسُولَ اللَّهِ ذَرَارِيُّ الْمُؤْمِنِينَ؟ قَالَ: «مِنْ آبَائِهِمْ» . فَقُلْتُ: يَا رَسُولَ اللَّهِ بِلَا عَمَلٍ؟ قَالَ: «اللَّهُ أَعْلَمُ بِمَا كَانُوا عَامِلِينَ» . قُلْتُ فذاراري الْمُشْرِكِينَ؟ قَالَ: «مِنْ آبَائِهِمْ» . قُلْتُ: بِلَا عَمَلٍ؟ قَالَ: «اللَّهُ أَعْلَمُ بِمَا كَانُوا عَامِلِينَ» . رَوَاهُ أَبُو دَاوُد