Thousands of publicly traded stocks offer their investors a dividend. Some of those stocks are a value trap and some are a true bargain. Some face immense headwinds and a possible dividend cut, while others are on the verge of expanding their payments to investors. Meanwhile, there are stocks that pay out a valuable dividend and offer investors upside for stock-price gains. Here are two top stocks that fit that bill.

Not the same automaker

The stereotype of terribly shortsighted and arrogant business decisions has driven many investors away from owning Detroit's largest automaker, General Motors (GM 1.56%). But the car manufacturer is far from the company it used to be prior to the Great Recession, when it received a government bailout. Here's one perfect example of just how differently General Motors is running its business now.

In a largely stunning and unforeseen move that truly makes a lot of sense, General Motors announced on March 6 that it would sell off its Opel/Vauxhall European operations to PSA Group. The reason was simple: If the company can't turn a meaningful profit there in the near term, it'll focus its capital elsewhere. For context, GM's European business has lost over $22 billion since 1999 -- that's staggering.

Carlos Tavares, chairman of the Managing Board of PSA, and Mary T. Barra, GM chairman and chief executive officer, shaking hands.

Carlos Tavares, chairman of the Managing Board of PSA, and Mary T. Barra, GM chair and chief executive officer. Image source: General Motors.

GM's strategy, outlined in the graphic below, shows that GM recognizes where its best opportunities are and where it plans to reduce operations that won't generate meaningful return on investment.

Graphic showing GM's business units on a chart of potential business opportunity or weakness.

Image source: General Motors' Opel to PSA Group presentation.

Just consider some of the net positives the sale of Opel would have made on GM's 2016. Adjusted earnings would have moved from $6.12 per share to $6.40, with EBIT-adjusted margins moving from 7.5% to 8.6%. Capital expenditures would have declined by roughly $1.1 billion, and GM's target cash pile could be lighter by about $2 billion. 

General Motors is making better business decisions and focusing on more lucrative markets, and it'll pay you an annual dividend of $1.52 per share for a tasty 4.01% yield -- that's a meager 24% payout ratio. Furthermore, the selling of its European operations will enable GM to dish out an additional $2 billion back to shareholders in the form of share repurchases. 

No rest for the weary

To say Polaris Industries (PII 0.49%) stumbled in 2016 would be a significant understatement. The power sports juggernaut lowered its earnings guidance in September, for the third time since December 2015. It struggled with recall costs, 2017 product launch delays, and overall off-road vehicle (ORV) industry weakness. Its stock reacted as one would expect: poorly.

PII Chart

PII data by YCharts

While 2016 was far worse than expected, Polaris still has strong brands that made it a winner in prior years: It's still widely known for its innovative product lines such as its Slingshot, in addition to its namesake Polaris ORVs and the Indian Motorcycle brand that has gained traction over the years. Plus, it also made a smart move when it decided to exit its failing Victory Motorcycles brand in 2012, after sales peaked years ago and the brand failed to record a profit since its inception in 1998.

Despite having a brutal 2016, the company should get back on track this year. For 2017, Polaris anticipates revenue to move 10% to 13% higher, which should equate to a 2017 adjusted net income of between $4.25 and $4.50 per share, excluding costs related to exiting Victory Motorcycles. Polaris also dishes out an annual dividend of $2.32 -- which it even increased despite its brutal year -- for a yield of 2.7%. This might prove to be a great entry point for a solid dividend stock with upside earnings potential.

A pair with potential

Ultimately, these are two stocks that have gone out of favor with Wall Street, but right now savvy investors can scoop them up at a solid entry point and take advantage of their dividend payouts while the companies try to boost their stock price.