Paul Goldschmidt hit a two-run home run off the left-field foul pole and LHP Wade Miley turned in his second consecutive solid start as the Diamondbacks avoided a sweep on Sunday with a win over the Atlanta Braves at Turner Field.

The Diamondbacks finished their nine-game trip through San Diego, Pittsburgh and Atlanta with a 4-5 record.

With Miley, who walked to start the inning, still on first base with two outs, Braves LHP Alex Wood tried to go inside on Goldschmidt with an 0-1 fastball.

But Goldschmidt turned on it, yanking it down the left field line. The only question was if it would stay fair.

"I knew it probably had the distance," Goldschmidt said. "That was one of the few times I was just watching to see what was going to happen. I saw it hit the pole and come down, so I was pretty happy."

Miley was glad he didn't have to work too hard to score.