If I remember the book correctly, the device didn't malfunction, but was positively reinforcing the brain to cause more seizures by stimulating pleasure producing areas while disrupting the seizure.
Yes — a different and more elaborate scenario, really. I suppose I was just thinking of ways machines embedded in your brain can go wrong.