Abdullah bin Masud reported,

When the verse "those who believe and do not mix their faith with wrongdoing" [Anam 6:82] was revealed, we said, "Messenger of Allah, which of us does not wrong himself?"The Prophet ﷺ replied, "It is not as you suppose. 'Do not mix their faith with wrongdoing' means with shirk. Have you not heard what Luqman said to his son, 'My son, do not associate anything with Allah. Shirk is indeed a monstrous wrong' [Luqman 31:13]?"

Bukhari 3360

Sahih

حدثنا عمر بن حفص بن غياث حدثنا أبي حدثنا الأعمش قال حدثني إبراهيم عن علقمة

عن عبد الله رضي الله عنه قال

لما نزلت {الذين آمنوا ولم يلبسوا إيمانهم بظلم} قلنا يا رسول الله أينا لا يظلم نفسه قال ليس كما تقولون {لم يلبسوا إيمانهم بظلم} بشرك أولم تسمعوا إلى قول لقمان لابنه {يا بني لا تشرك بالله إن الشرك لظلم عظيم}

البخاري 3360صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Hadiths of the prophets
Chapter
Saying of Allah the Most High, "And Allah took Ibrahim as a close friend"
Numbering
Darussalam 3360
Bukhari 3360