It is narrated from Sayyiduna Abu Umamah (may Allah be pleased with him): "A man died who had done no good deed except three handfuls of earth that he had thrown into a grave, so all his sins were forgiven."
This is a good (hasan) mawquf report on this topic.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 6731