You wouldn't "walk away with equity" as such, but you would clear some profit, albeit relative to inflation, capital appreciation of the next house purchase etc
May also be a puntive fee for settling the mortgage outside of any agreed repayment date.