Diamond Sutra, chapter 17
The Buddha continued:
"If a follower were to give away many treasures, would a great blessing and merit be generated?"
Subhuti replied, "Yes they would acquire considerable blessings and merit."
The Buddha said:
"Subhuti, if such a blessing had any substantiality, if it were anything other than a figure of speech, I would not have used the words 'blessings and merit'."
The Buddha is challenging public ideas about karma. Karma is a complicated matter in Buddhism. Many people then, and now, thought of it as 'if you do good things, then good things will happen to you'. The point is we should practice virtue because we want to practice virtue, not because we believe it will generate good karma for us.