LOS ANGELES  - A Las Vegas judge on Wednesday dismissed the cocaine possession case against pop star Bruno Mars after he successfully completed court-ordered drug education classes and community service, even exceeding the amount of hours he was told to serve.

Clark County District Court Judge Jessie Walsh cleared Bruno of the charge, said Mary Ann Price, court information officer for the 8th Judicial District Court.

Mars, whose real name is Peter Hernandez, was arrested in September 2010 after a bathroom attendant at the Las Vegas Hard Rock Hotel caught him with “a baggy of white powder,” later found to be cocaine, according to a police report at the time. He pleaded guilty to a charge of possessing cocaine and received a $2,000 fine, 200 hours of community service, drug counseling and was told to stay out of trouble during a year of informal probation. Bruno performed all the requirements and exceeded the 200 hours of service, his attorney told Reuters. Mars’ original guilty plea was nullified and will not show up on his record.

The “Grenade” singer, 26, burst onto music charts in 2010 after collaborating with rapper B.o.B on “Nothin’ On You” and Gym Class Heroes’ Travie McCoy on “Billionaire.” He is currently nominated in six categories at the upcoming Grammy Awards in February. Judge Walsh took over Mars’ case after County Clark Deputy District Attorney David Schubert, who prosecuted Mars in early 2011, was arrested for buying cocaine himself a few months later.