The Supreme Court on Tuesday upheld Gauhati high court's decision that had set aside the NIA court's order discharging Assam Independent MLA Akhil Gogoi in connection with offences under the Unlawful Activities (Prevention) Act for anti-CAA protests and alleged Maoists links, but granted him bail during the pendency of the trial.