DETROIT — Tommy Kahnle had to see the trainer after the second game of the Yankees’ doubleheader sweep over the Tigers on Thursday. He issued a walk and gave up a triple before being pulled in the ninth of the Bombers’ 6-4 win.

Aaron Boone said Kahnle slammed his hand against a sunflower seed container.

“He did something to his finger,’’ Boone said. “He’s fine, I think.”

The manager added he would talk to Kahnle about controlling his emotions.

Aaron Judge also gave the Yankees an injury scare in the top of the fourth of the second game when he crashed into the right-field wall to make a nice catch on John Hicks’ fly ball.

Judge hit the left side of his body into the wall but said he was OK.

Asked how he was following the game, Judge said he was fine and added, “How’s the wall?”

Luke Voit homered for the first time since July 22 — and the first time since he’s returned from an IL stint for a sports hernia — when he went deep in the first game of the doubleheader, a 10-4 win. Voit also added a ground-rule double and an RBI single in the opening win.

He went 1-for-3 with a walk in Game 2.

“I think the quality of his at-bats are getting better,’’ Boone said after the first game. “I think his timing is getting better the last four or five games. His at-bat quality was a little inconsistent when he came back.’’

DJ LeMahieu went hitless in six at-bats in the opener, which Boone called a “rare game where he didn’t get his best swings off.’’

LeMahieu struck out twice as his batting average dropped to .323, the lowest it’s been since June 24.

“I felt like timing-wise he was good,’’ Boone said. “Maybe he was expanding [the strike zone] a little bit. … It’s nothing I’m too concerned about.”

LeMahieu bounced back in style in Game 2, going 3-for-5 with an RBI double and is now batting .325. Nevertheless, he did strike out another two times.

Ben Heller made his return from Tommy John surgery when he pitched an inning in the Game 1 victory. Heller hadn’t appeared in the majors since 2017. He gave up a run in his lone inning of work.

Austin Romine had three hits in the opener — his third straight game with multiple hits. He’s now 34-for-95 (.358) with eight doubles, five homers and 17 RBIs in his last 29 games.