2 Corinthians 7:8-9

7:8 For even if I made you sad by my letter, I do not regret having written it (even though I did regret it, for I see that my letter made you sad, though only for a short time). 7:9 Now I rejoice, not because you were made sad, but because you were made sad to the point of repentance. For you were made sad as God intended, so that you were not harmed in any way by us.

2 Corinthians 7:12

7:12 So then, even though I wrote to you, it was not on account of the one who did wrong, or on account of the one who was wronged, but to reveal to you your eagerness on our behalf before God.