Thanks to its ongoing fake-accounts scandal, which we recently discovered was worse than initially reported, Wells Fargo (NYSE:WFC) has been among the worst performers in the banking industry. In fact, over the past year, the financial sector has been one of the hottest areas of the market, up by more than 22%, while Wells Fargo has fallen by 0.4%.

Here's a rundown of Wells Fargo's problems, it's recent business results, and whether it could be a smart long-term investment now.

WFC Chart

WFC data by YCharts

Wells Fargo's drama: The short version

To make a long story short, in September 2016, Wells Fargo revealed that employees may have opened just over 2 million unauthorized accounts to meet ambitious sales targets. As a result, the bank agreed to pay $185 million in fines, made significant leadership changes, and ended its sales culture of trying to maximize cross-selling success at any cost.

Couple looking at tablet PC with worried expressions.

Many of Wells Fargo's customers have discovered accounts that they didn't authorize. Image source: Getty Images.

A recently released third-party review, which covered a longer time period than the original estimate, found that the problem was even worse than originally thought. The number of improperly opened accounts rose to as many as 3.5 million.

In addition to the fake-accounts drama, the bank has been the subject of a few smaller scandals as well. In July, it was revealed that Wells Fargo wrongly charged more than 800,000 car loan borrowers for auto insurance they didn't need. About a month before that, the company was accused of making unauthorized changes to many of its home loans. In August, the bank faced additional scrutiny for failing to refund guaranteed auto protection insurance money to some borrowers. Most recently, the bank has been accused of improperly raising customers' mortgage rates.

Recent results

Despite these setbacks, the damage done to Wells Fargo by these scandals may not be as bad as you think. The first quarter of 2017 definitely showed a slump in earnings and revenue, and a lower level of efficiency than is typical for the bank. In its second-quarter earnings report, however, the bank showed characteristically strong return on assets and return on equity metrics, as well as an improvement in efficiency.

Wells Fargo typically runs a leaner and more profitable operation than the rest of the "big four" U.S. banks, and it doesn't look as if the fake-accounts scandal is going to change that -- although the gap has narrowed a bit.

WFC Return on Equity (TTM) Chart

WFC Return on Equity (TTM) data by YCharts

An incredible institution

To be clear, Wells Fargo is certainly guilty of some bad behavior over the past decade or so. And its business could continue to suffer as a result.

However, from a long-term perspective, these issues should all be temporary in nature. Wells Fargo has made appropriate changes to address the problems with its sales culture, and in the wake of the recent scandals coming to light, you can bet that the bank will be on its best behavior for the foreseeable future.

Wells Fargo's largest shareholder is Warren Buffett-led conglomerate Berkshire Hathaway (NYSE:BRK-A) (NYSE:BRK-B), and Buffett has stood by the bank. Shortly after news of the fake-accounts scandal broke, Buffett called the bank an "incredible institution" that made a terrible mistake.

Just recently, when asked about the possibility of more negative Wells Fargo headlines, Buffett didn't seem too concerned. "What you find is that there's never just one cockroach in the kitchen," Buffett told CNBC. In other words, when one bad behavior is brought to light and everyone starts to take a closer look, it's common to find more issues.

However, Buffett said he's still not concerned about the bank as a long-term investment: "It's a terrific bank. ... There were some things that were very wrong done there, but they are being corrected."

I agree with Buffett. We could certainly see even more negative headlines, and it's entirely possible that Wells Fargo could continue to underperform its sector in the near term. From a long-term perspective, however, this could be an opportunity to get into a great bank at a discount.

Matthew Frankel owns shares of Bank of America and Berkshire Hathaway (B shares). The Motley Fool owns shares of and recommends Berkshire Hathaway (B shares). The Motley Fool has a disclosure policy.