Canadian mortgage lender Home Capital is doing well, and that's why Warren Buffett is ditching it.

Shares of Home Capital fell 12 percent on Wednesday after Buffett's Berkshire Hathaway said it was going to "substantially exit" its investment once the lender completes a share buyback.

Just a year ago, Berkshire swooped in to help stabilize the lender with a $1.5 billion credit line and a 20 percent stake originally acquired at C$9.55 a share. At the time, Home Capital was experiencing a run on deposits. Berkshire was also prepared to invest in more shares, but Home Capital shareholders turned it down.

The shares are now trading around C$14.50. The credit line has also been repaid.

The remaining investment is "now not of a size to justify our ongoing involvement," Buffett said in a statement, though he would continue to "cheer from the sidelines."

Berkshire held the stake through its subsidiary Columbia Insurance Co.

"Berkshire's investment in Home Capital provided substantive assistance to the Company and created stability and value for the Company and its stakeholders at a critical time in 2017," Yousry Bissada, Home Capital's president and CEO, said in a statement. "Since that time, Home Capital has returned to profitability, strengthened its business and made significant progress on its strategy for sustainable growth."