JPMorgan Chase ( JPM) reported a 68% gain in profits, fueled by the solid performance of its investment bank.

But the retail banking operation of the nation's third-largest lender showed some weakness in the fourth quarter, which could be an indication of potential trouble ahead for JPMorgan and other banks.

It's one reason shares of JPMorgan Chase were flat in afternoon trading, even though earnings and revenue surpassed analyst expectations. The stock most recently traded at $48.38.

There's no denying that much of the headline news coming from JPMorgan was positive. In the quarter, JPMorgan earned $4.53 billion, or $1.26 a share, compared to $2.7 billion, or 76 cents, a year ago. On an operating basis, which excludes a big gain on the sale of the bank's corporate trust business, JPMorgan earned $3.9 billion, or $1.09 a share. Total revenue rose 14% to $16.9 billion.

The quarter benefited from a big 51% surge in profit at JPMorgan's investment bank. Fees from traditional investment banking work and revenue generated from proprietary trading generated $1 billion in profit for the group.

The bank's private equity business also had solid results. Revenue rose 33% from the third quarter to $250 million.

But it was another story at JPMorgan's retail bank. Profit made by its 3,079 bank branches fell by 7.5%, to $619 million. Revenue squeaked higher by just 4%, to $2.9 billion. Noninterest expenses from regional banking, meanwhile, rose 6%, to $1.73 billion.

Most notably, the retail banking results were impacted by a $215 million pre-tax loss stemming from the repositioning of its mortgage portfolio. The New York-based bank says it re-categorized $13.3 billion of home loans as held-for-sale.

Meanwhile, the credit quality of the bank's other consumer loans deteriorated in the quarter. The company upped its provision for consumer loan losses by $78 million, to $165 million, attributing some of that to concern about mortgages to borrowers with shaky credit histories and loans it acquired from Bank of New York.

Net charge-offs in the retail bank more than doubled from the third quarter and rose 61% from the fourth quarter of 2005, to $137 million.

Jamie Dimon, JPMorgan's chairman and CEO, all but ignored the mediocre retail banking performance in a conference call with analysts. Instead, Dimon painted a rather rosy picture that seemed a bit at odds with the actual numbers.

"We feel very good about the retail business," he says. "We had modest growth, stable margins, but if you really look at it, again, what you see is more home equity loans, more credit card sales, more mortgage sales, more deposits, more bankers, more branches, more ATMs. The team over there is kind of humming."

Michael Cavanagh, the bank's CFO, was similarly upbeat about the retail business.

"The consumer portfolio really behaved as expected," says Cavanagh. "Credit trends continue to be below the normal levels for a cycle."

But not everyone on Wall Street is buying it. Mike Mayo, an analyst at Prudential Equity Group, says JPMorgan's earnings "look like a tale of two banks."

"Half the company reflects strong market-sensitive businesses, including record investment banking and asset management, and higher private equity," he writes in a note. "The other half of the company is getting dragged down by sluggish growth in traditional banking.''

Mayo says he expects other banks to post similar uneven results as the fourth-quarter earnings season unfolds.

Later this week, Citigroup ( C) is set to report earnings. Bank of America ( BAC) is scheduled to report next Tuesday.

Investors will keep a close eye on those two banking giants to see if they report a similar slowdown in retail lending.