What's the most frequent mistake you've made as a boss? If you're like most executives, it's this: Failing to deal with an underperforming employee in a timely way. That observation comes from LinkedIn CEO Jeff Weiner, who recently sat down with CNBC's Adam Bryant for a video interview that covered many aspects of his life and management philosophy. 

Bryant began the interview by asking Weiner what the biggest lesson was he'd learned. Weiner's answer: "To not leave the pitcher in the game too long."

He explained further. "In baseball, oftentimes you'll see a pitcher come out strong and their arm begins to tire as the game progresses. The manager comes out of the dugout, asks the pitcher--especially top pitchers, star pitchers--how they're doing. And inevitably, the pitcher will respond, 'I'm doing fine, go take a seat.' A lot of times, you'll see the manager go back to the dugout, and then the pitcher gives up a home run within the next few batters and the team will lose."

That loss is the manager's fault, Weiner says, for not fixing a known problem. "It's really not the pitcher's role to be dictating what the manager does. It's up to the manager to make that decision."

It carries over into the workplace because employees rarely, if ever, let their managers know when they can't succeed at their jobs. "In roughly 20 years of managing people, I've never had anyone come to me and raise their hand and say they can't do their job. Not once," Weiner says.

This is what he's learned to do when faced with an employee who's struggling:

1. Trust your instincts.

Wondering whether an employee is in trouble is a lot like wondering whether you're in love. The fact that you're asking yourself the question tells you everything you need to know. "You don't ask that question about superstars," Weiner says.

So the real challenge isn't determining whether an employee can do the job or not--if you're asking, they most likely can't. The challenge is taking action to address the problem. "Far too many managers and executives--and I'm certainly among those--you just look the other way and you rationalize it," Weiner says. "You're fearful of the uncertainty, of change, of demoralizing the team, of how quickly you're going to be able to recruit a replacement. A whole litany of concerns."

Those concerns, along with your natural resistance to upsetting the employee and the rest of the team, can lead otherwise good bosses to do nothing when they need to do something, Weiner says. "I've made that mistake a few times and it can be a painful lesson." 

2. Tell the employee what you expect.

"What I've learned over time is that in situations like that, you should sit down with the person and say, 'We have an issue. There's a gap between where the bar is set for this role and your performance. I'm rooting for you, I'm the reason you're in this role, and I'm going to work with you to do everything within my power to get you up to the bar, if not over it. Here's the timetable and I'm going to be completely open with you throughout on the progress that we're making.'"

And, Weiner says, you have to make clear that if the employee can't meet your expectations, there will have to be a change. "To the extent that we're not able to get up to that bar, let's think about a different role for you either within the organization or potentially outside the organization." Which is a gentle way of saying that if the employee can't do the job better, he or she may be fired.

3. Don't worry that you're being unkind. You're being the opposite.

Weiner is an advocate of compassionate leadership, so one of the questions he's asked most often is: How can a compassionate leader ever fire an employee?

"One of the least compassionate things you can do is let that person stay in a role where they're way over their head," he says. "A lot of people have been in situations where you work with a colleague who is not able to get the job done. That person may have previously been self-confident and assertive and had a lot to contribute at meetings and to the team. Over time, they just become a shadow of their former selves. You can see it in their body language and the way they show up at a table. You don't hear from them as often and they're just not the same."

That's why you have to take action. "It's not good for their team, it's certainly not good for them, and they bring that energy home with them. So it has pretty significant implications," Weiner says. "That's why I think it's so important to do the right thing and, in that case, put yourself in the other person's shoes and do what you can to alleviate that suffering, to help them achieve a better objective."

4. Remember that by letting someone go, you may be doing that person a favor.

"It may turn out at times that letting somebody go is the most compassionate thing you can do," Weiner says. "I've heard in a number of cases, people after the fact--maybe while it's happening they don't feel this way--but after the fact, they'll come back and say it was one of the best things that happened in their career."

Count me in that number. Years ago, I was fired from my job as a daily reporter on a small-town newspaper. It was a job I'd stumbled into--they had an opening they needed to fill--and it fueled my fantasies inspired by movies like All the President's Men or more recently, Spotlight and The Post. But I didn't love sitting through lengthy town council meetings or wandering around the mall on December 26th, asking the world's earliest Christmas shoppers what they were buying. My background as a freelance magazine writer wasn't really right either. It made me very good at some parts of the job and completely clueless at other parts.

Driving home on the day they told me to clean out my desk, I remember feeling shocked and dismayed, but also very much relieved. What my bosses didn't know was that I had been planning to leave anyhow after a year. I hated the job, but figured it would be a good learning experience to stick it out that long. Looking back, they saved me from wasting a year of my life on something that made me miserable, and I'm guessing they found a reporter who liked the job more and did it better than I did.

So take it from someone who's been on the receiving end--don't sit on your hands if someone isn't working out. By addressing the problem head on, you won't only be helping your company. You'll be helping the employee as well.