Industrial conglomerate 3M (MMM 0.46%) took a massive $10.3 billion pre-tax charge in the second quarter related to a proposed settlement over PFAS chemicals in U.S. water systems. While that total will be payable over 13 years, the impact on generally accepted accounting principles (GAAP) earnings was concentrated in Q2.

This proposed settlement greatly reduces the uncertainty surrounding 3M's PFAS liability, which is good news for long-term investors. Excluding the impact of this settlement, 3M's Q2 results were better than expected.

Total revenue sank 4.4% year over year to $8.32 billion, beating the average analyst estimate by $440 million. Adjusted earnings per share (EPS), which exclude the PFAS settlement, came in at $2.17, a full $0.41 higher than analysts were expecting.

On top of a stronger-than-expected Q2, 3M boosted its adjusted earnings guidance for the full year. The company now expects to produce adjusted EPS between $8.60 and $9.10, up from a previous range of $8.50 to $9.00.

While 3M isn't entirely out of the woods on the legal liability front, and its revenue is still trending lower, the stock looks like a solid choice for buy-and-hold investors.

Maintaining double-digit margins

Organic revenue was weak across 3M's segments during Q2. However, the company's cost-cutting actions helped all four segments maintain operating margins in the vicinity of 20%.

The safety and industrial segment saw organic revenue drop 4.6%, but adjusted operating margin rose slightly to 22.2%. Disposable respirator sales plunged, accounting for the entire drop in organic revenue. The transportation and electronics segment suffered a 2.4% decline in organic revenue and a drop in operating margin to 19.8%, with weakness in electronics offsetting strength elsewhere.

In the healthcare segment, which 3M eventually plans to spin off, organic revenue grew by just 0.1%, and operating margin was 19.8%. Lastly, the consumer segment saw organic revenue drop 2.2% as demand for various consumer product categories declined. Operating margin in the consumer segment dipped slightly to a still healthy 18.2%.

Overall, 3M reported adjusted EPS of $2.17 and adjusted free cash flow of $1.5 billion in Q2. While adjusted EPS was down 12% from the same period last year, free cash flow soared 44% thanks to inventory reductions. One thing to note: 3M's adjusted earnings figures include costs associated with restructuring actions, which reduced this metric in the first half of the year.

Valuation and the dividend

With 3M now expected to report adjusted EPS between $8.60 and $9.10 this year, the stock sports a price-to-earnings (P/E) ratio of about 12 at the midpoint of that guidance range. While earnings are under pressure from weak demand, that valuation doesn't seem unreasonable.

3M also pays a solid dividend, and the sustainability of that dividend is clearer now that the PFAS settlement is a known quantity. The latest quarterly dividend of $1.50 per share works out to a dividend yield of about 5.5%.

The dividend does eat up around two-thirds of adjusted earnings, so at the very least, dividend growth is going to be very slow for the foreseeable future. The company's track record of increasing its dividend annually goes back more than 60 years. That's not a guarantee that the dividend is safe, but the company is unlikely to turn to a dividend cut to preserve cash unless it has no other choice.

3M still faces lawsuits over military earplugs, and the company will need to find a way to boost organic growth back into positive territory amid a tough economy. But 3M is making good progress in cutting costs and keeping its bottom line afloat, and the dividend gives investors a good reason to stick around as the company works on its turnaround.