Wells Fargo (NYSE:WFC) reported second-quarter earnings this morning that beat analyst estimates on the bottom line, but came up short on the top line. The bank's shares are down more than 1% on the news in intraday trading.

If you look at Wells Fargo's bottom line, you may be surprised by the market's reaction. For the three months ended June 30, the California-based bank earned $1.07 per share. That was up from $1.01 in the year-ago quarter, and also came in above the $1.01 per-share consensus estimate among analysts.

"Second quarter 2017 results demonstrated the benefit of our diversified business model as we continued to generate strong financial results, invest for the future, and adhere to our prudent risk discipline," said CEO Tim Sloan in prepared remarks. "We remain committed to reducing expenses and improving the efficiency of our company, and we are very focused on our recently announced goals."

Wells Fargo's earnings were fueled by an increase in net interest income. This reflects how much a bank earns from its portfolio of interest-earning assets, net of funding costs. For the quarter, Wells Fargo's net interest income climbed 6%, or $750 million, compared to the year-ago period.

Another positive note concerned Wells Fargo's credit costs. Banks stash money away every quarter in anticipation of future loan losses. They do so by way of loan-loss provisions, which essentially act like an expense insofar as earnings are concerned. It's this figure that declined in Wells Fargo's latest quarter, falling by nearly half over the past year. In the second quarter of 2016, the bank recorded a $1 billion provision. That fell to $555 million in the second quarter of this year.

Wells Fargo branch sign.

Image source: The Motley Fool.

Yet, despite these trends, Wells Fargo's revenue nevertheless came in below analyst expectations. KBW's Brian Kleinhanzl anticipated operating revenues of $22.7 billion, which was meaningfully higher than the actual result of $22.2 billion.

Wells Fargo's noninterest income is principally to blame for the top-line miss. All told, revenue from its fee-based businesses fell 7% in the quarter, or $743 million, on a year-over-year basis. Within this category, the principal culprit was a 19% drop in mortgage-banking income.

Stalling loan growth also played a role in suppressing Wells Fargo's top line. If you compare the bank's aggregate loan portfolio at the end of the first quarter to the end of the second quarter, the figure actually declined by 1%, or approximately $10 billion. This is worth noting, not just because of its impact on Wells Fargo, but also because of the role that credit expansion plays in economic growth -- without the former, one shouldn't expect the latter.

Finally, Wells Fargo continues to see its expense base increase in the wake of its fake-account scandal. Total noninterest expenses were up $675 million, spread across a number of line items. The one that's most notable is a 34% uptick in expenses for outside professional services, related, in part, to higher legal expenses stemming from allegations that Wells Fargo employees fraudulently opened millions of accounts for customers without their knowledge in order to boost the bank's cross-sale ratio.

In sum, it was a mixed quarter for Wells Fargo. While shareholders of the nation's third-biggest bank by assets might have wished for more, particularly in terms of revenue, the bank's performance was solid, offering no reason to change one's investment thesis with respect to its stock.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.