If it's a willful Brady violation the charges get dismissed with prejudice.
If that happens, and it's a huge if, I hope they go ahead and sue the prosecution. The immunity shield for prosecutors is extremely high, but I have to imagine that a judge ruling there was an intentional violation gives them a shot at a settlement, which could help with the legal fees. /armchair legal advice from someone without a high school diploma