The Giants said X-rays were negative.
Bumgarner completed the inning, pitched a scoreless second and batted a half-inning later, but manager Bruce Bochy decided to pull the left-hander before the beginning of the third.
"It got him really good," Bochy said. "You know Madison and how tough he is. He didn't wave us off, so I knew it got him pretty good. When he swung the bat, he could really feel it. We got a break. X-rays were negative, and he should be fine to go after the [All-Star] break."
Bumgarner considered himself fortunate.
"As close as we are and facing the type of hitters we are, it's going to happen," he said. "You hope that it doesn't, and some guys are fortunate enough for it not to, but the law of averages says sometimes you're going to get a ball back up the middle."
Bumgarner, a potential target for several teams ahead of the July 31 trade deadline, is 5-7 with a 4.02 ERA.
The Associated Press contributed to this report.
Bumgarner takes line drive to elbow, leaves game
Madison Bumgarner takes a line drive right to his left elbow in the first inning, and he finishes two innings before exiting the game.