LOS ANGELES (AP) — Jeff Samardzija learned the hard way last season that the grass wasn't necessarily greener on the south side of Chicago than it was during his six-plus seasons on the north side — not by a long shot.

He gave up the most runs, earned runs and hits in the majors in 2015, and tied for the American League lead in home runs allowed with 29. So he cut his losses — 13 of them to be precise — and left the White Sox as a free agent to sign a five-year, $90 million contract with the San Francisco Giants.

Sunday night, he made a critical mistake to Joc Pederson of the Los Angeles Dodgers, which resulted in a go-ahead two-run homer and a 3-1 loss that spoiled an otherwise strong outing by the veteran right-hander.

"I think everybody has a hiccup, whether it's a pitcher or position player," manager Bruce Bochy said in reference to Samardzija's season last year. "We liked his arm, his stuff and his makeup, so we felt he'd be a great fit on this club. That's why he's here."

Samardzija (1-1) allowed three runs and six hits in six-plus innings, striking out three and walking three. But in the fifth, Pederson hit a two-out drive into the right-field pavilion after a walk to Yasmani Grandal, and the Dodgers added a run in the seventh on Grandal's RBI single.

"I thought I was very close there to this being a day that we really could be proud of. Unfortunately, it took a different turn," Samardzija said. "I felt good today. I got a lot of groundballs. If there was one pitch I'd like to have back, it was the one to Joc, for sure. We were sinking him away and off the plate, but it just stayed on the plate."

Japanese import Kenta Maeda (2-0) allowed a run and four hits over seven innings, struck out seven and walked three. He had pitched six scoreless innings of five-hit ball in each of his two previous starts and extended his shutout streak to 14 2/3 innings before Joe Panik ended it with a third-inning homer.

Panik drove a 2-2 pitch into the lower seats in the right-field corner for his second of the season - ending an 11-game drought by the Giants at Dodger Stadium. Their last homer here was by pitcher Madison Bumgarner on Sept. 23, 2014, against Zack Greinke.

"It was supposed to be a back-door slider, and it just missed up and over the middle," Grandal said. "Panik put a charge into that one, but it's going to happen. If you make mistakes up here, obviously you're going to pay for them."

In the seventh, Samardzija bunted into an inning-ending double play started by Maeda. The right-hander, who gave up only one walk during his first two starts, had two in the Giants' first. But he escaped the jam by retiring Brandon Belt on a flyball.

Chris Hatcher pitched a perfect eighth inning and Kenley Jansen got three outs in the ninth to pick up his fifth save in as many appearances.

SPAN GETTING ATTENTION

Giants CF and leadoff hitter Denard Span has nine RBIs in his first 12 games) with the club, after spending the previous three seasons with the Washington Nationals. The nine-year veteran, who signed a three-year, $31-million contract in January, was limited to 61 games last season because of hip, back and core muscle injuries that required surgery. "I think all that's all behind him because he knows he's a hundred percent," manager Bruce Bochy said. "It's hard when you come off surgery because you always have a little doubt in your mind as to whether you're a hundred percent. But I think that's been answered. I think you're seeing a healthy Span that is going all out. From the time of the surgery and having to get ready for the season, he had the confidence to know that he's fine. Now he can go and explode like he normally does — whether it's stealing a base, going from first to third, scoring from second or playing center field."

UP NEXT

Giants: RHP Jake Peavy (0-1) will start the opener of a four-game series against Arizona on Monday night. The 2007 NL Cy Young Award winner leads all active pitchers with 17 victories against the Diamondbacks, and is 5-1 with a 3.38 ERA in his last six starts against them.

Dodgers: LHP Alex Wood (1-1) starts the opener of a three-game set in Atlanta on Tuesday night. This is his first start against the Braves since they traded him to Los Angeles last July 30 in a three-team, eight-player deal with the Miami Marlins.