He learned his lesson

1. He did something wrong and now knows what is right.