SunTrust Banks (STI) posted a second-quarter net income of $467 million, or $0.89 per average common diluted share, slightly up from $0.78 per share earned in the prior quarter. 

Earnings per share increased $0.17 over the second quarter of 2014, which was negatively impacted by $0.09 per share, related to the resolution of specific legacy mortgage-related matters, partially offset by the gain on sale of RidgeWorth.  Excluding the prior-year matters, earnings per share grew 10% year over year. 

Total revenue was $2.1 billion for the current quarter, an increase of $85 million compared to the prior quarter, primarily driven by higher net interest income and broad-based growth in noninterest income, with particularly strong growth in investment banking income. 

This beat revenue estimates by $50 million, according to Seeking Alpha.

Compared to the second quarter of 2014, total revenue declined $124 million.

However, excluding the gain on sale of RidgeWorth in the second quarter of 2014, revenue declined $19 million, driven largely by a decrease in net interest income and foregone RidgeWorth revenue, partially offset by higher investment banking income. 

Mortgage production-related income dropped to $76 million, down from $83 million for the prior quarter but up from $52 million for the second quarter of 2014.  The sequential quarter decrease was due to a decline in interest rate lock volume and gain-on-sale margins. 

However, the increase compared to the second quarter of 2014 was driven by higher mortgage production volume and a decline in the provision for repurchases, which was partially offset by a decline in gain-on-sale margins. 

In addition, mortgage-servicing income was $30 million for the current quarter, compared to $43 million in the prior quarter and $45 million in the second quarter of 2014. 

"Our performance this quarter demonstrates solid execution of our key strategies - deepening client relationships, optimizing the balance sheet, and improving efficiency.  This was evidenced by higher revenue, continued deposit growth, and improved returns.  In addition, our asset quality performance continues to be strong," said William H. Rogers, chairman and CEO of SunTrust Banks.