Warren E. Buffett's Berkshire Hathaway has more than 90% of its portfolio invested in stocks that pay dividends, with his four largest holdings having an average yield of 3.1%.

He is known as a long-term investor who focuses on quality. But Buffett actually has much in common with dividend investors.

That makes finding compelling dividend investment ideas from his portfolio a good idea for those looking for both safety and yield.

Take a look at Buffett's highest-yielding stocks, and then let's look at his highest-yielding stock, General Motors (GM) - Get Report .

Image placeholder title

The company is a blue-chip business with a long operating history. In fact, it is one of only 32S&P 500 blue-chip businesses with a 100-plus year operating history and a 3%-plus dividend yield.

It also has a dividend yield of 4.75%. By comparison, the S&P 500 has a dividend yield of just 2%.

This company also just posted second-quarter results and is showing significant growth.

GM makes up 1.2% of Buffett's portfolio, though it isn't one of his largest holdings.

The company's bankruptcy in 2009 still holds a prominent spot in investor's minds. Billions in shareholder value was wiped out.

But the GM of today isn't the GM of 2009.

Don't tell other investors that, though. Pessimism surrounding the company has caused it to have an exceptionally low price-earnings ratio of just 4.7.

To put these numbers in perspective, the S&P 500 has a P/E ratio of 25.02. GM is trading at less than 20% of the overall market's valuation, which shows deep value.

There is no question that GM is a tremendous bargain at these prices, even if it doesn't grow from current levels. This is probably why it has made the cut to be in Buffett's portfolio.

GM is the largest car and truck manufacturer in North America, with a 16.6% market share.

Despite its U.S. heritage, GM is a global business. The company generated about 40% of sales internationally as well.

GM posted excellent second-quarter results on Thursday.

Net revenue grew to $42.4 billion in the quarter, versus $38.2 billion a year earlier and an adjusted earnings increase to $1.81 a share, from $1.29 a year earlier.

"This was an outstanding quarter for GM. Our results were generated by strong retail sales in the U.S., record sales in China and a continued emphasis on improving the performance of our operations worldwide," said Chief Executive Mary Barra.

"We'll continue to focus on driving profitable growth and leveraging our technical expertise to lead in the future of personal mobility," she said.

The company increased its 2016 guidance and now expects adjusted earnings of between $5.50 and $6 a share, compared with $5.02 a share last year.

So why is GM's P/E ratio so low? It shouldn't be below 5 or even 10.

The reason is pessimism about the company's long-term prospects. The company's bankruptcy casts a negative shadow.

In addition, the entire automobile industry is being called into question by futurists. There are several potential threats that GM faces.

One is Uber.

It is possible that fewer and fewer people will want to own cars as time goes by. Why go into debt to buy a car when one can hire an Uber from location to location?

Another threat is the smart car. If companies such as Apple and Alphabet's Google enter the automotive industry with self-driving cars, traditional auto companies such as GM would be seriously disrupted.

Apple and Alphabet are holdings in Jim Cramer's Action Alerts PLUS Charitable Trust Portfolio. See how Cramer rates the stocks here. Want to be alerted before Cramer buys or sells AAPL or GOOGL? Learn more now.

Additionally, ultra-low oil prices have helped GM increase its profit margin.

Lower oil prices gently nudge consumers to purchase trucks and sport utility vehicles instead of smaller cars. Trucks and SUVs have higher margins for GM, which boosts profits in the short run.

Higher short-term earnings mean a lower P/E ratio, all other things being equal.

Finally, GM carries a large amount of debt and operates in a cyclical industry. When the next recession hits, and another one will at some point, GM will very likely see its sales and earnings plummet as consumers put off buying new cars.

GM has more than $70 billion in debt on its balance sheet. In addition, its pension is underfunded by about $26 billion.

On the plus side, the company does have more than $18 billion in cash on its books. Still, a severe recession could spell trouble for GM.

Yes, GM faces risks.

But the company's absurdly low P/E ratio more than makes up for those risks. GM's favorable risk/return profile is likely why it has found a place in Buffett's portfolio.

The company's high dividend yield, low P/E ratio and continued positive results, despite potential headwinds, make this stock a potentially interesting investment for risk-tolerant investors looking for value and yield.

This article is commentary by an independent contributor. At the time of publication, the author held no positions in the stocks mentioned.