A court here on Saturday granted bail to Delhi University History professor Ratan Lal, who was arrested for posting derogatory content on social media after the 'discovery' of 'Shivling' inside the Gyanvapi mosque complex in Varanasi during a video survey.