Bank of America reported net income of $2.5 billion for the second quarter of 2012, or $0.19 per diluted share compared to a net loss of $8.8 billion in the second quarter of 2011. Analysts polled by Thomson Financial had expected earnings per share of $0.14.

The bank noted that the year-ago quarter included a total of $18.2 billion in pretax charges for certain mortgage-related items and other selected adjustments, including provisions for representations and warranties and goodwill impairment.

Bank of America said it originated approximately $4.0 billion in small business loans and commitments in the first six months of 2012, up 23% from the year-ago period, reflecting continued focus on supporting small businesses.

The company noted that its provision for credit losses in the second quarter of 2012 deceased $1.3 billion from the year-ago quarter to $186 million, driven by improved portfolio trends. The bank noted that the decline reached its lowest level since the first quarter of 2007.

“In a challenging global economy, we still see opportunities to do more with our customers and clients. Lending to commercial businesses increased for the sixth straight quarter — with small business lending and commitments up 23% in a year — and consumer credit is in the best shape in years,” said Brian Moynihan, chief executive officer.

To read the Bank of America news release, click here.