Discipline is not denial of liberty. In fact, discipline and liberty go hand in hand. If we want liberty for ourselves, we have to grant liberty to others also as others may also demand it in equal measure.
That can lead to chaos. So, we have to make a compromise and that is discipline. In other words, we have voluntarily to curtail a part of liberty that we want and others have likewise to do so for our sake. Thus, discipline ensures smooth flow of life.