1 Peter 3:14 (ESV)

14 But even if you should suffer for righteousness’ sake, you will be blessed. Have no fear of them, nor be troubled,

Even if there is the possibility of suffering coming to those who do good for sake of righteousness, the comfort is that “they will be granted a privilege of receiving the divine favour for it,” as also revealed in Matthew 5:10–12.1