Wikipedia notes that the technical term for flatline is asystole and adds this comment:
Despite defibrillation commonly appearing on medical dramas as a remedy for asystole, it is usually not done when there is a total absence of electrical activity, as it could actually make it more difficult to restart the heart.
The article on defibrillation makes a similar comment:
Similarly, medical providers are often depicted defibrillating patients with a "flat-line" ECG rhythm (also known as asystole); this is not done in real life as the heart is not restarted by the defibrillator itself.
Neither of these two claims are referenced. Searching quickly, I find plenty of references that defibrillators are not usable on flatlined patients but none of them appear to be authoritative. Pop culture apparently thinks it does work; the internet considers it a myth. Which is it?