Officials say Mars, whose real name is Peter Hernandez, was found with 2.6 grams of cocaine and arrested on suspicion of possession of a controlled substance.
Authorities say he was released without bail before 8 a.m. Sunday.
His publicist did not immediately return messages seeking comment from The Associated Press. A hotel spokeswoman declined comment.
Formal charges have not yet been filed.
"Just the Way You Are" is No. 3 on the Billboard Hot 100 chart.