Riyad as-Salihin, Book 1, Hadith 672 (In-Book)

Ibn 'Abbas (May Allah be pleased with them) reported: Messenger of Allah said, "If a person notices in his ruler what he dislikes, he should show patience because he who departs from the (Muslim) community a cubit, dies like those who died in the Days of Ignorance."[Al-Bukhari and Muslim].

وعن ابن عباس رضي الله عنهما أن رسول الله صلى الله عليه وسلم قال‏:‏ “من كره من أميره شيئاً فليصبر، فإنه من خرج من السلطان شبراً مات ميتة جاهلية” ‏(‏‏(‏متفق عليه‏)‏‏)‏ ‏.‏

sunnah.com