Mortgage activity for JPMorgan Chase & Co (JPM) improved in the fourth quarter, but quarterly and annual revenues were down while net revenue for the year hit a record  $21.8 billion.

JPMorgan reported net income for the fourth quarter of 2014 of $4.9 billion, compared with net income of $5.3 billion in the fourth quarter of 2013. Earnings per share were $1.19, compared with $1.3 in the fourth quarter of 2013. The firm had legal fees of $990 million in the quarter.

Revenue for the quarter was $23.6 billion, down 2% compared with the prior year. The firm’s return on tangible common equity for the fourth quarter of 2014 was 11%, compared with 14% in the prior year. Core loans increased by 8% compared with the prior year.

Net income for full-year 2014 was a record $21.8 billion, compared with $17.9 billion in the prior year. Earnings per share were $5.29 for 2014, also a record, compared with $4.35 for 2013.

Revenue for 2014 was $97.9 billion, down 2% compared with 2013 revenue of $99.8 billion.

Mortgage activity in the fourth quarter was mixed.

Mortgage originations were $23 billion, down 1% from the prior year and up 8% from the prior quarter.

Mortgage banking net income was $338 million, a decrease of $255 million from the prior year, driven by higher provision for credit losses and lower net revenue, largely offset by lower noninterest expense.

“Our businesses continue to demonstrate strong momentum and expense discipline. Consumer and community banking delivered impressive growth in deposits and investment assets in the fourth quarter and throughout 2014, while outperforming its expense reduction target for the year,” said Jamie Dimon, Chairman and CEO. “Mortgage originations improved sequentially in the fourth quarter, despite a seasonally slow quarter. Our card business delivered double-digit sales volume growth, outpacing the industry for the 27th consecutive quarter. Auto had a good quarter and the pipeline remains strong.”

Net revenue was $1.9 billion, a decrease of $405 million compared with the prior year. Net interest income was $1.0 billion, a decrease of $112 million, or 10%, driven by spread compression and lower loan balances due to portfolio runoff.

Noninterest revenue was $845 million, a decrease of $293 million, driven by lower mortgage fees and related income.

Mortgage production pretax income was $204 million, an increase of $472 million from the prior year, reflecting lower expense, partially offset by lower benefit from repurchase losses.

Mortgage production-related revenue, excluding repurchase losses, was $447 million, a decrease of $53 million from the prior year, primarily reflecting tighter margins due to a shift in mix. Production expense was $374 million, a decrease of $615 million from the prior year, predominantly due to the absence of non-MBS related legal expense and lower headcount-related expense.

Repurchase losses for the current quarter reflected a benefit of $131 million, compared with a benefit of $221 million in the prior year.

Mortgage servicing pretax income was $23 million, compared with $11 million in the prior year, reflecting lower expenses, predominantly offset by lower revenue and lower MSR risk management income. Mortgage net servicing-related revenue was $624 million, a decrease of $74 million from the prior year, driven by lower gains on excess interest only securities and lower average third party loans serviced, largely offset by higher gains on Government National Mortgage Association loan sales.

MSR risk management was a loss of $41 million, compared with a loss of $24 million in the prior year. Servicing expense1 was $560 million, a decrease of $103 million from the prior year due to lower headcount-related expense and lower expense on foreclosure-related matters.

Noninterest expense was $6.4 billion, a decrease of $910 million, or 12%, from the prior year, predominantly driven by lower Mortgage Banking expense.