I'm clarifying for Chickenlittle. The Tesla loan was paid off IN FULL with interest and NONE written off. The GM loan is the one that had write-offs. Someone is going to misunderstand post and start myth.
Disagree with N4HHE, the US loan was very valuable money to Tesla as it came before IPO. Subsequently, IPO raised money, and shortly after that quarterly profitability began, which all enabled payoff. But govt. investment certainly helped during pre-IPO days. My guess anyway.
In the video from Dell World, Elon said it was mostly the Daimler money in early 2009 that kept Tesla from folding. The money from the US govt only came around the middle of 2010 when the company was already recovering and was by no means a lifeline. It did help accelerate their growth/production, though.