A court martial of Riker and others involved may well have taken place after ST:GEN all right.
Whether it "worked out fine", we can debate from several angles. The next two times we see our heroes, they're stuck at their traditional ranks, aboard a ship smaller than their original ride, and Starfleet has told them to go to the corner and stay there until further notice. The third time doesn't exactly bring improvement, even if it involves a slightly more prestigious mission.
Might be Riker and Picard were found guilty of no wrongdoing but less than eligible for promotion in the near future.
Timo Saloniemi