The Karnataka High Court on Monday quashed an election code violation case against Bharatiya Janata Party (BJP) National President JP Nadda over a speech allegedly made to entice voters during a campaign in Harpanahalli town, Vijayanagar district, during the previous assembly elections.