Both are correct. Al-Salaf al-Saalih (the righteous forebears) are the elite of Ahl al-Sunnah wa’l-Jamaa’ah, and following them is the standard by which Ahl al-Sunnah are distinguished from others.
But what is more important than merely claiming to belong to them is belonging to them in a real sense, in words, beliefs and actions, and following them in that.
Shaykh ‘Abd al-‘Azeez ibn Baaz (may Allaah have mercy on him) was asked: Some people objected to saying that one belongs to Ahl al-Sunnah wa’l-Jamaa’ah and said that everyone says that, and it is better to say that one belongs to al-Salaf al-Saalih.
The Salaf are Ahl al-Sunnah wa’l-Jamaa’ah, and there is nothing wrong with saying that one belongs to them. Rather that is a duty, and he is one of the believers, one of the followers of Ahl al-Sunnah wa’l-Jamaa’ah, one of the followers of the Sahaabah, one of those who believe in Allaah and the Last Day, one who belongs to the people of truth and does not belong to the people of falsehood, who strives to follow truth path sincerely and does not pay mere lip service, who strives against his inclinations until he becomes sincere. End quote.