Narrated Abu Bakr:
You people recite this verse "You who believe, care for yourselves; he who goes astray cannot harm you when you are rightly-guided," and put it in its improper place.
Khalid's version has: We heard the Prophet (ﷺ) say: When the people see a wrongdoer and do not prevent him, Allah will soon punish them all. Amr ibn Hushaym's version has: I heard the Messenger of Allah (ﷺ) say: If acts of disobedience are done among any people and do not change them though the are able to do so, Allah will soon punish them all.
Adu Dawud said: This tradition has also been transmitted by Abu Usamah and a group transmitters similar to the version narrated by Khalid. The version of Shu'bah has: "If acts of obedience are done among any people who are more numerous than those who do them...."