Once there is basic faith in the person's heart, all his good deeds will be credited to him. Moreover, Allah rewards us for every good deed at least ten times its value. He may even multiply this reward to 700 times or even higher. Bad deeds are punished at their bare value only. To sum up, only a person who does not believe in the Oneness of Allah will not benefit by his good deeds.
Nothing can render good deeds futile except total disbelief.