7/28/2011 5:21 PM PDT

Lady Gaga to LAPD -- Thanks for the Mob Control!!!

It could have been another nasty riot situation -- but thanks to the LAPD, Lady Gaga made it to Jimmy Kimmel's studio in one piece ... and she expressed her gratitude in a handwritten note.

According to sources at the Chateau Marmont -- where Gaga is staying -- a hotel employee handed the note out to fans ... in which LG thanks the police for keeping the peace.

Gaga is set to appear tonight on "Jimmy Kimmel Live!"

As we previously reported, cops in riot gear descended on Hollywood last night -- after an impromptu "Electric Daisy Carnival Experience" premiere concert turned into a free-for-all.  Truth be told ... it was kinda lame. 

Shooting bean bags?  Seriously?