Sayyiduna Ka'b bin Malik al-Ansari (may Allah be pleased with him) used to say: Indeed, when the Messenger of Allah (peace and blessings be upon him) returned from a journey, he would first go to the mosque, pray two rak'ahs in it, and then sit for the people, for their questions and their requests for fatwas, for as long as he saw fit.
Hadith Referenceالمعجم الكبير للطبراني / باب الكاف / 16159