EMB ERJ 145 ER/LR
Flight Crew Air Transport Pilot (ATP)
Aircraft Equipment Problem Less Severe; Flight Deck / Cabin / Aircraft Event Smoke / Fire / Fumes / Odor
Flight Crew Returned To Departure Airport; Flight Crew Landed As Precaution
Aircraft
Right after takeoff as the gear was coming up in the flight deck we got a master warning for lavatory smoke. We [continued on our route] to clean up the aircraft and to reach a safe altitude as in the aviate; navigate; communicate. At this point I was able to smell a burning electrical smell from the flight deck as well. We called the flight attendant; who confirmed the smell as well did the passengers in 1A and 2A. The flight attendant went to the lavatory and saw no fire in the lavatory or cargo area. At this point I started to run the QRH for lavatory smoke. On the way back to the front of the aircraft the flight attendant reset the lavatory smoke system which cleared the message for us up front. Around the same time the electrical burning smell started to go away in the flight deck so we never declared an emergency and told ATC we needed to return for an electrical smell. I finished the QRH procedures and then went on to get landing data for the overweight landing including telling dispatch what was going on as well as calling operations on the radio for a new gate. On short final and on the runway landing roll I started to get short whiffs of the burning smell again; we taxied to the gate with no further issue.
EMB-145 First Officer reported returning to the departure airport after noticing an electrical smell and receiving a master warning for lavatory smoke.