What sea-faring tall ships movie was this?

Probably from the 30s or 40s. Life aboard an English war ship. One of the sub plots involved a cabin boy who happened to be the Admiral’s son. The Admiral was hated for his zealous use of flogging, so when his son was caught in a flogging offense he wasn’t spared the whip, to send a message to his dad. That, I believe, was the gist of it.

Not quite as you described, but does Damn the Defiant! sound close?